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

Side by Side Diff: test/cctest/compiler/test-run-bytecode-graph-builder.cc

Issue 1685633002: [interpreter] CompilationInfo::unoptimized_code only for OSR. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_interpreter-pipeline-1
Patch Set: Addressed comments. Created 4 years, 10 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-pipeline.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 <utility> 5 #include <utility>
6 6
7 #include "src/compiler/pipeline.h" 7 #include "src/compiler/pipeline.h"
8 #include "src/execution.h" 8 #include "src/execution.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 #include "src/interpreter/bytecode-array-builder.h" 10 #include "src/interpreter/bytecode-array-builder.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 .ToLocalChecked()); 117 .ToLocalChecked());
118 Handle<JSFunction> function = 118 Handle<JSFunction> function =
119 Handle<JSFunction>::cast(v8::Utils::OpenHandle(*api_function)); 119 Handle<JSFunction>::cast(v8::Utils::OpenHandle(*api_function));
120 CHECK(function->shared()->HasBytecodeArray()); 120 CHECK(function->shared()->HasBytecodeArray());
121 121
122 // TODO(mstarzinger): We should be able to prime CompilationInfo without 122 // TODO(mstarzinger): We should be able to prime CompilationInfo without
123 // having to instantiate a ParseInfo first. Fix this! 123 // having to instantiate a ParseInfo first. Fix this!
124 ParseInfo parse_info(zone_, function); 124 ParseInfo parse_info(zone_, function);
125 125
126 CompilationInfo compilation_info(&parse_info); 126 CompilationInfo compilation_info(&parse_info);
127 compilation_info.SetOptimizing(BailoutId::None(), Handle<Code>()); 127 compilation_info.SetOptimizing();
128 compilation_info.MarkAsDeoptimizationEnabled(); 128 compilation_info.MarkAsDeoptimizationEnabled();
129 compiler::Pipeline pipeline(&compilation_info); 129 compiler::Pipeline pipeline(&compilation_info);
130 Handle<Code> code = pipeline.GenerateCode(); 130 Handle<Code> code = pipeline.GenerateCode();
131 function->ReplaceCode(*code); 131 function->ReplaceCode(*code);
132 132
133 return function; 133 return function;
134 } 134 }
135 135
136 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphTester); 136 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphTester);
137 }; 137 };
(...skipping 2865 matching lines...) Expand 10 before | Expand all | Expand 10 after
3003 3003
3004 BytecodeGraphTester tester(isolate, zone, script.start()); 3004 BytecodeGraphTester tester(isolate, zone, script.start());
3005 auto callable = tester.GetCallable<>(); 3005 auto callable = tester.GetCallable<>();
3006 Handle<Object> return_value = callable().ToHandleChecked(); 3006 Handle<Object> return_value = callable().ToHandleChecked();
3007 CHECK(return_value->SameValue(*snippet.return_value())); 3007 CHECK(return_value->SameValue(*snippet.return_value()));
3008 } 3008 }
3009 3009
3010 } // namespace compiler 3010 } // namespace compiler
3011 } // namespace internal 3011 } // namespace internal
3012 } // namespace v8 3012 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-pipeline.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698