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_GRAPH_BUILDER_TESTER_H_ | 5 #ifndef V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ |
6 #define V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ | 6 #define V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 #include "test/cctest/cctest.h" | 9 #include "test/cctest/cctest.h" |
10 | 10 |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 } | 266 } |
267 | 267 |
268 return result; | 268 return result; |
269 } | 269 } |
270 | 270 |
271 virtual byte* Generate() { | 271 virtual byte* Generate() { |
272 if (code_.is_null()) { | 272 if (code_.is_null()) { |
273 Zone* zone = graph()->zone(); | 273 Zone* zone = graph()->zone(); |
274 CallDescriptor* desc = | 274 CallDescriptor* desc = |
275 Linkage::GetSimplifiedCDescriptor(zone, this->csig_); | 275 Linkage::GetSimplifiedCDescriptor(zone, this->csig_); |
276 code_ = Pipeline::GenerateCodeForTesting(main_isolate(), desc, graph()); | 276 CompilationInfo info("testing", main_isolate(), main_zone()); |
| 277 code_ = Pipeline::GenerateCodeForTesting(&info, desc, graph()); |
277 #ifdef ENABLE_DISASSEMBLER | 278 #ifdef ENABLE_DISASSEMBLER |
278 if (!code_.is_null() && FLAG_print_opt_code) { | 279 if (!code_.is_null() && FLAG_print_opt_code) { |
279 OFStream os(stdout); | 280 OFStream os(stdout); |
280 code_.ToHandleChecked()->Disassemble("test code", os); | 281 code_.ToHandleChecked()->Disassemble("test code", os); |
281 } | 282 } |
282 #endif | 283 #endif |
283 } | 284 } |
284 return code_.ToHandleChecked()->entry(); | 285 return code_.ToHandleChecked()->entry(); |
285 } | 286 } |
286 | 287 |
(...skipping 11 matching lines...) Expand all Loading... |
298 Node* return_; | 299 Node* return_; |
299 Node** parameters_; | 300 Node** parameters_; |
300 MaybeHandle<Code> code_; | 301 MaybeHandle<Code> code_; |
301 }; | 302 }; |
302 | 303 |
303 } // namespace compiler | 304 } // namespace compiler |
304 } // namespace internal | 305 } // namespace internal |
305 } // namespace v8 | 306 } // namespace v8 |
306 | 307 |
307 #endif // V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ | 308 #endif // V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ |
OLD | NEW |