| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_CCTEST_COMPILER_CODEGEN_TESTER_H_ | 5 #ifndef V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ |
| 6 #define V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ | 6 #define V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/compiler/pipeline.h" | 10 #include "src/compiler/pipeline.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 public MachineAssembler { | 23 public MachineAssembler { |
| 24 public: | 24 public: |
| 25 MachineAssemblerTester(MachineType return_type, MachineType p0, | 25 MachineAssemblerTester(MachineType return_type, MachineType p0, |
| 26 MachineType p1, MachineType p2, MachineType p3, | 26 MachineType p1, MachineType p2, MachineType p3, |
| 27 MachineType p4) | 27 MachineType p4) |
| 28 : HandleAndZoneScope(), | 28 : HandleAndZoneScope(), |
| 29 CallHelper(main_isolate()), | 29 CallHelper(main_isolate()), |
| 30 MachineAssembler(new (main_zone()) Graph(main_zone()), | 30 MachineAssembler(new (main_zone()) Graph(main_zone()), |
| 31 ToCallDescriptorBuilder(main_zone(), return_type, p0, | 31 ToCallDescriptorBuilder(main_zone(), return_type, p0, |
| 32 p1, p2, p3, p4), | 32 p1, p2, p3, p4), |
| 33 MachineOperatorBuilder::pointer_rep()) {} | 33 kMachPtr) {} |
| 34 | 34 |
| 35 Node* LoadFromPointer(void* address, MachineType rep, int32_t offset = 0) { | 35 Node* LoadFromPointer(void* address, MachineType rep, int32_t offset = 0) { |
| 36 return this->Load(rep, this->PointerConstant(address), | 36 return this->Load(rep, this->PointerConstant(address), |
| 37 this->Int32Constant(offset)); | 37 this->Int32Constant(offset)); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void StoreToPointer(void* address, MachineType rep, Node* node) { | 40 void StoreToPointer(void* address, MachineType rep, Node* node) { |
| 41 this->Store(rep, this->PointerConstant(address), node); | 41 this->Store(rep, this->PointerConstant(address), node); |
| 42 } | 42 } |
| 43 | 43 |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 | 354 |
| 355 void Run(RawMachineAssemblerTester<int32_t>* m); | 355 void Run(RawMachineAssemblerTester<int32_t>* m); |
| 356 void RunLeft(RawMachineAssemblerTester<int32_t>* m); | 356 void RunLeft(RawMachineAssemblerTester<int32_t>* m); |
| 357 void RunRight(RawMachineAssemblerTester<int32_t>* m); | 357 void RunRight(RawMachineAssemblerTester<int32_t>* m); |
| 358 }; | 358 }; |
| 359 } // namespace compiler | 359 } // namespace compiler |
| 360 } // namespace internal | 360 } // namespace internal |
| 361 } // namespace v8 | 361 } // namespace v8 |
| 362 | 362 |
| 363 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ | 363 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ |
| OLD | NEW |