Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1335)

Side by Side Diff: test/cctest/compiler/test-pipeline.cc

Issue 974213002: Extract ParseInfo from CompilationInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/compiler/test-loop-assignment-analysis.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/compiler/pipeline.h" 10 #include "src/compiler/pipeline.h"
11 #include "src/handles.h" 11 #include "src/handles.h"
12 #include "src/parser.h" 12 #include "src/parser.h"
13 #include "src/rewriter.h" 13 #include "src/rewriter.h"
14 #include "src/scopes.h" 14 #include "src/scopes.h"
15 15
16 using namespace v8::internal; 16 using namespace v8::internal;
17 using namespace v8::internal::compiler; 17 using namespace v8::internal::compiler;
18 18
19 TEST(PipelineAdd) { 19 TEST(PipelineAdd) {
20 InitializedHandleScope handles; 20 InitializedHandleScope handles;
21 const char* source = "(function(a,b) { return a + b; })"; 21 const char* source = "(function(a,b) { return a + b; })";
22 Handle<JSFunction> function = v8::Utils::OpenHandle( 22 Handle<JSFunction> function = v8::Utils::OpenHandle(
23 *v8::Handle<v8::Function>::Cast(CompileRun(source))); 23 *v8::Handle<v8::Function>::Cast(CompileRun(source)));
24 CompilationInfoWithZone info(function); 24 CompilationInfoWithZone info(function);
25 25
26 CHECK(Compiler::ParseAndAnalyze(&info)); 26 CHECK(Compiler::ParseAndAnalyze(info.parse_info()));
27 27
28 Pipeline pipeline(&info); 28 Pipeline pipeline(&info);
29 #if V8_TURBOFAN_TARGET 29 #if V8_TURBOFAN_TARGET
30 Handle<Code> code = pipeline.GenerateCode(); 30 Handle<Code> code = pipeline.GenerateCode();
31 CHECK(Pipeline::SupportedTarget()); 31 CHECK(Pipeline::SupportedTarget());
32 CHECK(!code.is_null()); 32 CHECK(!code.is_null());
33 #else 33 #else
34 USE(pipeline); 34 USE(pipeline);
35 #endif 35 #endif
36 } 36 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-loop-assignment-analysis.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698