| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_ | 5 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_ |
| 6 #define V8_COMPILER_MACHINE_OPERATOR_H_ | 6 #define V8_COMPILER_MACHINE_OPERATOR_H_ |
| 7 | 7 |
| 8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
| 9 #include "src/machine-type.h" | 9 #include "src/machine-type.h" |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 bool IsSupported() const { return op_ != nullptr; } | 25 bool IsSupported() const { return op_ != nullptr; } |
| 26 const Operator* op() const { | 26 const Operator* op() const { |
| 27 DCHECK_NOT_NULL(op_); | 27 DCHECK_NOT_NULL(op_); |
| 28 return op_; | 28 return op_; |
| 29 } | 29 } |
| 30 | 30 |
| 31 private: | 31 private: |
| 32 const Operator* const op_; | 32 const Operator* const op_; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 // Supported write barrier modes. | |
| 36 enum WriteBarrierKind { | |
| 37 kNoWriteBarrier, | |
| 38 kMapWriteBarrier, | |
| 39 kPointerWriteBarrier, | |
| 40 kFullWriteBarrier | |
| 41 }; | |
| 42 | |
| 43 std::ostream& operator<<(std::ostream& os, WriteBarrierKind); | |
| 44 | |
| 45 | 35 |
| 46 // A Load needs a MachineType. | 36 // A Load needs a MachineType. |
| 47 typedef MachineType LoadRepresentation; | 37 typedef MachineType LoadRepresentation; |
| 48 | 38 |
| 49 LoadRepresentation LoadRepresentationOf(Operator const*); | 39 LoadRepresentation LoadRepresentationOf(Operator const*); |
| 50 | 40 |
| 51 // A Store needs a MachineType and a WriteBarrierKind in order to emit the | 41 // A Store needs a MachineType and a WriteBarrierKind in order to emit the |
| 52 // correct write barrier. | 42 // correct write barrier. |
| 53 class StoreRepresentation final { | 43 class StoreRepresentation final { |
| 54 public: | 44 public: |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 }; | 546 }; |
| 557 | 547 |
| 558 | 548 |
| 559 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) | 549 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) |
| 560 | 550 |
| 561 } // namespace compiler | 551 } // namespace compiler |
| 562 } // namespace internal | 552 } // namespace internal |
| 563 } // namespace v8 | 553 } // namespace v8 |
| 564 | 554 |
| 565 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 555 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
| OLD | NEW |