| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 typedef MachineType CheckedLoadRepresentation; | 95 typedef MachineType CheckedLoadRepresentation; |
| 96 | 96 |
| 97 CheckedLoadRepresentation CheckedLoadRepresentationOf(Operator const*); | 97 CheckedLoadRepresentation CheckedLoadRepresentationOf(Operator const*); |
| 98 | 98 |
| 99 | 99 |
| 100 // A CheckedStore needs a MachineType. | 100 // A CheckedStore needs a MachineType. |
| 101 typedef MachineRepresentation CheckedStoreRepresentation; | 101 typedef MachineRepresentation CheckedStoreRepresentation; |
| 102 | 102 |
| 103 CheckedStoreRepresentation CheckedStoreRepresentationOf(Operator const*); | 103 CheckedStoreRepresentation CheckedStoreRepresentationOf(Operator const*); |
| 104 | 104 |
| 105 MachineRepresentation StackSlotRepresentationOf(Operator const* op); |
| 105 | 106 |
| 106 // Interface for building machine-level operators. These operators are | 107 // Interface for building machine-level operators. These operators are |
| 107 // machine-level but machine-independent and thus define a language suitable | 108 // machine-level but machine-independent and thus define a language suitable |
| 108 // for generating code to run on architectures such as ia32, x64, arm, etc. | 109 // for generating code to run on architectures such as ia32, x64, arm, etc. |
| 109 class MachineOperatorBuilder final : public ZoneObject { | 110 class MachineOperatorBuilder final : public ZoneObject { |
| 110 public: | 111 public: |
| 111 // Flags that specify which operations are available. This is useful | 112 // Flags that specify which operations are available. This is useful |
| 112 // for operations that are unsupported by some back-ends. | 113 // for operations that are unsupported by some back-ends. |
| 113 enum Flag { | 114 enum Flag { |
| 114 kNoFlags = 0u, | 115 kNoFlags = 0u, |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 const Operator* Float64ExtractHighWord32(); | 299 const Operator* Float64ExtractHighWord32(); |
| 299 const Operator* Float64InsertLowWord32(); | 300 const Operator* Float64InsertLowWord32(); |
| 300 const Operator* Float64InsertHighWord32(); | 301 const Operator* Float64InsertHighWord32(); |
| 301 | 302 |
| 302 // load [base + index] | 303 // load [base + index] |
| 303 const Operator* Load(LoadRepresentation rep); | 304 const Operator* Load(LoadRepresentation rep); |
| 304 | 305 |
| 305 // store [base + index], value | 306 // store [base + index], value |
| 306 const Operator* Store(StoreRepresentation rep); | 307 const Operator* Store(StoreRepresentation rep); |
| 307 | 308 |
| 309 const Operator* StackSlot(MachineRepresentation rep); |
| 310 |
| 308 // Access to the machine stack. | 311 // Access to the machine stack. |
| 309 const Operator* LoadStackPointer(); | 312 const Operator* LoadStackPointer(); |
| 310 const Operator* LoadFramePointer(); | 313 const Operator* LoadFramePointer(); |
| 311 | 314 |
| 312 // checked-load heap, index, length | 315 // checked-load heap, index, length |
| 313 const Operator* CheckedLoad(CheckedLoadRepresentation); | 316 const Operator* CheckedLoad(CheckedLoadRepresentation); |
| 314 // checked-store heap, index, length, value | 317 // checked-store heap, index, length, value |
| 315 const Operator* CheckedStore(CheckedStoreRepresentation); | 318 const Operator* CheckedStore(CheckedStoreRepresentation); |
| 316 | 319 |
| 317 // Target machine word-size assumed by this builder. | 320 // Target machine word-size assumed by this builder. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 }; | 360 }; |
| 358 | 361 |
| 359 | 362 |
| 360 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) | 363 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) |
| 361 | 364 |
| 362 } // namespace compiler | 365 } // namespace compiler |
| 363 } // namespace internal | 366 } // namespace internal |
| 364 } // namespace v8 | 367 } // namespace v8 |
| 365 | 368 |
| 366 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ | 369 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ |
| OLD | NEW |