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