| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 }; | 362 }; |
| 373 | 363 |
| 374 | 364 |
| 375 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) | 365 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) |
| 376 | 366 |
| 377 } // namespace compiler | 367 } // namespace compiler |
| 378 } // namespace internal | 368 } // namespace internal |
| 379 } // namespace v8 | 369 } // namespace v8 |
| 380 | 370 |
| 381 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 371 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
| OLD | NEW |