OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 #include "test/cctest/cctest.h" | 6 #include "test/cctest/cctest.h" |
7 | 7 |
8 #include "src/compiler.h" | 8 #include "src/compiler.h" |
9 #include "src/compiler/pipeline.h" | 9 #include "src/compiler/pipeline.h" |
10 #include "src/handles.h" | 10 #include "src/handles.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 CompilationInfoWithZone info(function); | 23 CompilationInfoWithZone info(function); |
24 | 24 |
25 CHECK(Parser::Parse(&info)); | 25 CHECK(Parser::Parse(&info)); |
26 StrictMode strict_mode = info.function()->strict_mode(); | 26 StrictMode strict_mode = info.function()->strict_mode(); |
27 info.SetStrictMode(strict_mode); | 27 info.SetStrictMode(strict_mode); |
28 CHECK(Rewriter::Rewrite(&info)); | 28 CHECK(Rewriter::Rewrite(&info)); |
29 CHECK(Scope::Analyze(&info)); | 29 CHECK(Scope::Analyze(&info)); |
30 CHECK_NE(NULL, info.scope()); | 30 CHECK_NE(NULL, info.scope()); |
31 | 31 |
32 Pipeline pipeline(&info); | 32 Pipeline pipeline(&info); |
| 33 #if V8_TURBOFAN_TARGET |
33 Handle<Code> code = pipeline.GenerateCode(); | 34 Handle<Code> code = pipeline.GenerateCode(); |
34 #if V8_TURBOFAN_TARGET | |
35 CHECK(Pipeline::SupportedTarget()); | 35 CHECK(Pipeline::SupportedTarget()); |
36 CHECK(!code.is_null()); | 36 CHECK(!code.is_null()); |
37 #else | 37 #else |
38 USE(code); | 38 USE(pipeline); |
39 #endif | 39 #endif |
40 } | 40 } |
OLD | NEW |