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/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
10 #include "src/compiler/instruction-selector.h" | 10 #include "src/compiler/instruction-selector.h" |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 } | 272 } |
273 | 273 |
274 return result; | 274 return result; |
275 } | 275 } |
276 | 276 |
277 virtual byte* Generate() { | 277 virtual byte* Generate() { |
278 if (code_.is_null()) { | 278 if (code_.is_null()) { |
279 Zone* zone = graph()->zone(); | 279 Zone* zone = graph()->zone(); |
280 CallDescriptor* desc = | 280 CallDescriptor* desc = |
281 Linkage::GetSimplifiedCDescriptor(zone, this->csig_); | 281 Linkage::GetSimplifiedCDescriptor(zone, this->csig_); |
282 CompilationInfo info(ArrayVector("testing"), main_isolate(), main_zone()); | 282 CompilationInfo info(ArrayVector("testing"), main_isolate(), main_zone(), |
| 283 Code::ComputeFlags(Code::STUB)); |
283 code_ = Pipeline::GenerateCodeForTesting(&info, desc, graph()); | 284 code_ = Pipeline::GenerateCodeForTesting(&info, desc, graph()); |
284 #ifdef ENABLE_DISASSEMBLER | 285 #ifdef ENABLE_DISASSEMBLER |
285 if (!code_.is_null() && FLAG_print_opt_code) { | 286 if (!code_.is_null() && FLAG_print_opt_code) { |
286 OFStream os(stdout); | 287 OFStream os(stdout); |
287 code_.ToHandleChecked()->Disassemble("test code", os); | 288 code_.ToHandleChecked()->Disassemble("test code", os); |
288 } | 289 } |
289 #endif | 290 #endif |
290 } | 291 } |
291 return code_.ToHandleChecked()->entry(); | 292 return code_.ToHandleChecked()->entry(); |
292 } | 293 } |
(...skipping 12 matching lines...) Expand all Loading... |
305 Node* return_; | 306 Node* return_; |
306 Node** parameters_; | 307 Node** parameters_; |
307 MaybeHandle<Code> code_; | 308 MaybeHandle<Code> code_; |
308 }; | 309 }; |
309 | 310 |
310 } // namespace compiler | 311 } // namespace compiler |
311 } // namespace internal | 312 } // namespace internal |
312 } // namespace v8 | 313 } // namespace v8 |
313 | 314 |
314 #endif // V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ | 315 #endif // V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ |
OLD | NEW |