| 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/instruction-selector.h" | 10 #include "src/compiler/instruction-selector.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 61 } |
| 62 | 62 |
| 63 void GenerateCode() { Generate(); } | 63 void GenerateCode() { Generate(); } |
| 64 | 64 |
| 65 protected: | 65 protected: |
| 66 virtual byte* Generate() { | 66 virtual byte* Generate() { |
| 67 if (code_.is_null()) { | 67 if (code_.is_null()) { |
| 68 Schedule* schedule = this->Export(); | 68 Schedule* schedule = this->Export(); |
| 69 CallDescriptor* call_descriptor = this->call_descriptor(); | 69 CallDescriptor* call_descriptor = this->call_descriptor(); |
| 70 Graph* graph = this->graph(); | 70 Graph* graph = this->graph(); |
| 71 CompilationInfo info(graph->zone()->isolate(), graph->zone()); | 71 code_ = |
| 72 Linkage linkage(graph->zone(), call_descriptor); | 72 Pipeline::GenerateCodeForTesting(call_descriptor, graph, schedule); |
| 73 Pipeline pipeline(&info); | |
| 74 code_ = pipeline.GenerateCodeForMachineGraph(&linkage, graph, schedule); | |
| 75 } | 73 } |
| 76 return this->code_.ToHandleChecked()->entry(); | 74 return this->code_.ToHandleChecked()->entry(); |
| 77 } | 75 } |
| 78 | 76 |
| 79 private: | 77 private: |
| 80 MaybeHandle<Code> code_; | 78 MaybeHandle<Code> code_; |
| 81 }; | 79 }; |
| 82 | 80 |
| 83 | 81 |
| 84 template <typename ReturnType> | 82 template <typename ReturnType> |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 | 330 |
| 333 void Run(RawMachineAssemblerTester<int32_t>* m); | 331 void Run(RawMachineAssemblerTester<int32_t>* m); |
| 334 void RunLeft(RawMachineAssemblerTester<int32_t>* m); | 332 void RunLeft(RawMachineAssemblerTester<int32_t>* m); |
| 335 void RunRight(RawMachineAssemblerTester<int32_t>* m); | 333 void RunRight(RawMachineAssemblerTester<int32_t>* m); |
| 336 }; | 334 }; |
| 337 } // namespace compiler | 335 } // namespace compiler |
| 338 } // namespace internal | 336 } // namespace internal |
| 339 } // namespace v8 | 337 } // namespace v8 |
| 340 | 338 |
| 341 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ | 339 #endif // V8_CCTEST_COMPILER_CODEGEN_TESTER_H_ |
| OLD | NEW |