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 |
35 | 45 |
36 // A Load needs a MachineType. | 46 // A Load needs a MachineType. |
37 typedef MachineType LoadRepresentation; | 47 typedef MachineType LoadRepresentation; |
38 | 48 |
39 LoadRepresentation LoadRepresentationOf(Operator const*); | 49 LoadRepresentation LoadRepresentationOf(Operator const*); |
40 | 50 |
41 // A Store needs a MachineType and a WriteBarrierKind in order to emit the | 51 // A Store needs a MachineType and a WriteBarrierKind in order to emit the |
42 // correct write barrier. | 52 // correct write barrier. |
43 class StoreRepresentation final { | 53 class StoreRepresentation final { |
44 public: | 54 public: |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 }; | 556 }; |
547 | 557 |
548 | 558 |
549 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) | 559 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) |
550 | 560 |
551 } // namespace compiler | 561 } // namespace compiler |
552 } // namespace internal | 562 } // namespace internal |
553 } // namespace v8 | 563 } // namespace v8 |
554 | 564 |
555 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 565 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
OLD | NEW |