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