| 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/compiler/machine-type.h" | 9 #include "src/compiler/machine-type.h" |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 std::ostream& operator<<(std::ostream& os, WriteBarrierKind); | 23 std::ostream& operator<<(std::ostream& os, WriteBarrierKind); |
| 24 | 24 |
| 25 | 25 |
| 26 // A Load needs a MachineType. | 26 // A Load needs a MachineType. |
| 27 typedef MachineType LoadRepresentation; | 27 typedef MachineType LoadRepresentation; |
| 28 | 28 |
| 29 | 29 |
| 30 // A Store needs a MachineType and a WriteBarrierKind in order to emit the | 30 // A Store needs a MachineType and a WriteBarrierKind in order to emit the |
| 31 // correct write barrier. | 31 // correct write barrier. |
| 32 class StoreRepresentation FINAL { | 32 class StoreRepresentation final { |
| 33 public: | 33 public: |
| 34 StoreRepresentation(MachineType machine_type, | 34 StoreRepresentation(MachineType machine_type, |
| 35 WriteBarrierKind write_barrier_kind) | 35 WriteBarrierKind write_barrier_kind) |
| 36 : machine_type_(machine_type), write_barrier_kind_(write_barrier_kind) {} | 36 : machine_type_(machine_type), write_barrier_kind_(write_barrier_kind) {} |
| 37 | 37 |
| 38 MachineType machine_type() const { return machine_type_; } | 38 MachineType machine_type() const { return machine_type_; } |
| 39 WriteBarrierKind write_barrier_kind() const { return write_barrier_kind_; } | 39 WriteBarrierKind write_barrier_kind() const { return write_barrier_kind_; } |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 MachineType machine_type_; | 42 MachineType machine_type_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 61 | 61 |
| 62 // A CheckedStore needs a MachineType. | 62 // A CheckedStore needs a MachineType. |
| 63 typedef MachineType CheckedStoreRepresentation; | 63 typedef MachineType CheckedStoreRepresentation; |
| 64 | 64 |
| 65 CheckedStoreRepresentation CheckedStoreRepresentationOf(Operator const*); | 65 CheckedStoreRepresentation CheckedStoreRepresentationOf(Operator const*); |
| 66 | 66 |
| 67 | 67 |
| 68 // Interface for building machine-level operators. These operators are | 68 // Interface for building machine-level operators. These operators are |
| 69 // machine-level but machine-independent and thus define a language suitable | 69 // machine-level but machine-independent and thus define a language suitable |
| 70 // for generating code to run on architectures such as ia32, x64, arm, etc. | 70 // for generating code to run on architectures such as ia32, x64, arm, etc. |
| 71 class MachineOperatorBuilder FINAL : public ZoneObject { | 71 class MachineOperatorBuilder final : public ZoneObject { |
| 72 public: | 72 public: |
| 73 // Flags that specify which operations are available. This is useful | 73 // Flags that specify which operations are available. This is useful |
| 74 // for operations that are unsupported by some back-ends. | 74 // for operations that are unsupported by some back-ends. |
| 75 enum Flag { | 75 enum Flag { |
| 76 kNoFlags = 0u, | 76 kNoFlags = 0u, |
| 77 kFloat32Abs = 1u << 0, | 77 kFloat32Abs = 1u << 0, |
| 78 kFloat32Max = 1u << 1, | 78 kFloat32Max = 1u << 1, |
| 79 kFloat32Min = 1u << 2, | 79 kFloat32Min = 1u << 2, |
| 80 kFloat64Abs = 1u << 3, | 80 kFloat64Abs = 1u << 3, |
| 81 kFloat64Max = 1u << 4, | 81 kFloat64Max = 1u << 4, |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 }; | 279 }; |
| 280 | 280 |
| 281 | 281 |
| 282 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) | 282 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) |
| 283 | 283 |
| 284 } // namespace compiler | 284 } // namespace compiler |
| 285 } // namespace internal | 285 } // namespace internal |
| 286 } // namespace v8 | 286 } // namespace v8 |
| 287 | 287 |
| 288 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 288 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
| OLD | NEW |