| 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_FUNCTION_TESTER_H_ | 5 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ |
| 6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ | 6 #define V8_CCTEST_COMPILER_FUNCTION_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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 CHECK(Parser::Parse(&info)); | 215 CHECK(Parser::Parse(&info)); |
| 216 info.SetOptimizing(BailoutId::None(), | 216 info.SetOptimizing(BailoutId::None(), |
| 217 Handle<Code>(function->shared()->code())); | 217 Handle<Code>(function->shared()->code())); |
| 218 CHECK(Rewriter::Rewrite(&info)); | 218 CHECK(Rewriter::Rewrite(&info)); |
| 219 CHECK(Scope::Analyze(&info)); | 219 CHECK(Scope::Analyze(&info)); |
| 220 CHECK(AstNumbering::Renumber(info.function(), info.zone())); | 220 CHECK(AstNumbering::Renumber(info.function(), info.zone())); |
| 221 CHECK(Compiler::EnsureDeoptimizationSupport(&info)); | 221 CHECK(Compiler::EnsureDeoptimizationSupport(&info)); |
| 222 | 222 |
| 223 Pipeline pipeline(&info); | 223 Pipeline pipeline(&info); |
| 224 Linkage linkage(&info); | 224 Linkage linkage(info.zone(), &info); |
| 225 Handle<Code> code = pipeline.GenerateCodeForMachineGraph(&linkage, graph); | 225 Handle<Code> code = pipeline.GenerateCodeForMachineGraph(&linkage, graph); |
| 226 CHECK(!code.is_null()); | 226 CHECK(!code.is_null()); |
| 227 function->ReplaceCode(*code); | 227 function->ReplaceCode(*code); |
| 228 return function; | 228 return function; |
| 229 } | 229 } |
| 230 }; | 230 }; |
| 231 } | 231 } |
| 232 } | 232 } |
| 233 } // namespace v8::internal::compiler | 233 } // namespace v8::internal::compiler |
| 234 | 234 |
| 235 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ | 235 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ |
| OLD | NEW |