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

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

Issue 1304053004: Deprecate semi-correct CompilationInfo::flags predicate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test-pipeline.cc Created 5 years, 4 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 | « src/lithium.cc ('k') | no next file » | 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/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"
11 #include "src/parser.h" 11 #include "src/parser.h"
12 12
13 using namespace v8::internal; 13 using namespace v8::internal;
14 using namespace v8::internal::compiler; 14 using namespace v8::internal::compiler;
15 15
16 static void RunPipeline(Zone* zone, const char* source) { 16 static void RunPipeline(Zone* zone, const char* source) {
17 Handle<JSFunction> function = v8::Utils::OpenHandle( 17 Handle<JSFunction> function = v8::Utils::OpenHandle(
18 *v8::Handle<v8::Function>::Cast(CompileRun(source))); 18 *v8::Handle<v8::Function>::Cast(CompileRun(source)));
19 ParseInfo parse_info(zone, function); 19 ParseInfo parse_info(zone, function);
20 CHECK(Compiler::ParseAndAnalyze(&parse_info)); 20 CHECK(Compiler::ParseAndAnalyze(&parse_info));
21 CompilationInfo info(&parse_info); 21 CompilationInfo info(&parse_info);
22 info.SetOptimizing(BailoutId::None(), Handle<Code>(function->code()));
22 23
23 Pipeline pipeline(&info); 24 Pipeline pipeline(&info);
24 Handle<Code> code = pipeline.GenerateCode(); 25 Handle<Code> code = pipeline.GenerateCode();
25 CHECK(!code.is_null()); 26 CHECK(!code.is_null());
26 } 27 }
27 28
28 29
29 TEST(PipelineTyped) { 30 TEST(PipelineTyped) {
30 HandleAndZoneScope handles; 31 HandleAndZoneScope handles;
31 FLAG_turbo_types = true; 32 FLAG_turbo_types = true;
32 RunPipeline(handles.main_zone(), "(function(a,b) { return a + b; })"); 33 RunPipeline(handles.main_zone(), "(function(a,b) { return a + b; })");
33 } 34 }
34 35
35 36
36 TEST(PipelineGeneric) { 37 TEST(PipelineGeneric) {
37 HandleAndZoneScope handles; 38 HandleAndZoneScope handles;
38 FLAG_turbo_types = false; 39 FLAG_turbo_types = false;
39 RunPipeline(handles.main_zone(), "(function(a,b) { return a + b; })"); 40 RunPipeline(handles.main_zone(), "(function(a,b) { return a + b; })");
40 } 41 }
OLDNEW
« no previous file with comments | « src/lithium.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698