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

Side by Side Diff: test/cctest/compiler/function-tester.cc

Issue 2505933008: [compiler] Ensure code unsupported by Crankshaft goes to Ignition. (Closed)
Patch Set: Fix GetBaselineCode Created 4 years 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/cctest.status ('k') | test/cctest/test-api.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 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 #include "test/cctest/compiler/function-tester.h" 5 #include "test/cctest/compiler/function-tester.h"
6 6
7 #include "src/ast/ast-numbering.h" 7 #include "src/ast/ast-numbering.h"
8 #include "src/compilation-info.h" 8 #include "src/compilation-info.h"
9 #include "src/compiler.h" 9 #include "src/compiler.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 Handle<JSFunction> FunctionTester::Compile(Handle<JSFunction> function) { 157 Handle<JSFunction> FunctionTester::Compile(Handle<JSFunction> function) {
158 Zone zone(function->GetIsolate()->allocator(), ZONE_NAME); 158 Zone zone(function->GetIsolate()->allocator(), ZONE_NAME);
159 ParseInfo parse_info(&zone, handle(function->shared())); 159 ParseInfo parse_info(&zone, handle(function->shared()));
160 CompilationInfo info(&parse_info, function); 160 CompilationInfo info(&parse_info, function);
161 161
162 info.SetOptimizing(); 162 info.SetOptimizing();
163 info.MarkAsDeoptimizationEnabled(); 163 info.MarkAsDeoptimizationEnabled();
164 if (flags_ & CompilationInfo::kInliningEnabled) { 164 if (flags_ & CompilationInfo::kInliningEnabled) {
165 info.MarkAsInliningEnabled(); 165 info.MarkAsInliningEnabled();
166 } 166 }
167 if (Compiler::EnsureBytecode(&info)) { 167
168 CHECK(Compiler::Compile(function, Compiler::CLEAR_EXCEPTION));
169 if (info.shared_info()->HasBytecodeArray()) {
168 info.MarkAsOptimizeFromBytecode(); 170 info.MarkAsOptimizeFromBytecode();
169 } else { 171 } else {
170 CHECK(Compiler::ParseAndAnalyze(info.parse_info())); 172 CHECK(Compiler::ParseAndAnalyze(info.parse_info()));
171 CHECK(Compiler::EnsureDeoptimizationSupport(&info)); 173 CHECK(Compiler::EnsureDeoptimizationSupport(&info));
172 } 174 }
173 JSFunction::EnsureLiterals(function); 175 JSFunction::EnsureLiterals(function);
174 176
175 Handle<Code> code = Pipeline::GenerateCodeForTesting(&info); 177 Handle<Code> code = Pipeline::GenerateCodeForTesting(&info);
176 CHECK(!code.is_null()); 178 CHECK(!code.is_null());
177 info.dependencies()->Commit(code); 179 info.dependencies()->Commit(code);
(...skipping 14 matching lines...) Expand all
192 194
193 Handle<Code> code = Pipeline::GenerateCodeForTesting(&info, graph); 195 Handle<Code> code = Pipeline::GenerateCodeForTesting(&info, graph);
194 CHECK(!code.is_null()); 196 CHECK(!code.is_null());
195 function->ReplaceCode(*code); 197 function->ReplaceCode(*code);
196 return function; 198 return function;
197 } 199 }
198 200
199 } // namespace compiler 201 } // namespace compiler
200 } // namespace internal 202 } // namespace internal
201 } // namespace v8 203 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698