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

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

Issue 2156753002: [Intepreter] Always use BytecodeGraphBuilder when --turbo-from-bytecode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments Created 4 years, 5 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/cctest.status ('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 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 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 5 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
7 7
8 #include "src/ast/ast-numbering.h" 8 #include "src/ast/ast-numbering.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 private: 202 private:
203 uint32_t flags_; 203 uint32_t flags_;
204 204
205 Handle<JSFunction> Compile(Handle<JSFunction> function) { 205 Handle<JSFunction> Compile(Handle<JSFunction> function) {
206 Zone zone(function->GetIsolate()->allocator()); 206 Zone zone(function->GetIsolate()->allocator());
207 ParseInfo parse_info(&zone, function); 207 ParseInfo parse_info(&zone, function);
208 CompilationInfo info(&parse_info, function); 208 CompilationInfo info(&parse_info, function);
209 info.MarkAsDeoptimizationEnabled(); 209 info.MarkAsDeoptimizationEnabled();
210 210
211 CHECK(Parser::ParseStatic(info.parse_info())); 211 if (!FLAG_turbo_from_bytecode) {
212 CHECK(Parser::ParseStatic(info.parse_info()));
213 }
212 info.SetOptimizing(); 214 info.SetOptimizing();
213 if (flags_ & CompilationInfo::kFunctionContextSpecializing) { 215 if (flags_ & CompilationInfo::kFunctionContextSpecializing) {
214 info.MarkAsFunctionContextSpecializing(); 216 info.MarkAsFunctionContextSpecializing();
215 } 217 }
216 if (flags_ & CompilationInfo::kInliningEnabled) { 218 if (flags_ & CompilationInfo::kInliningEnabled) {
217 info.MarkAsInliningEnabled(); 219 info.MarkAsInliningEnabled();
218 } 220 }
219 if (FLAG_turbo_from_bytecode && function->shared()->HasBytecodeArray()) { 221 if (FLAG_turbo_from_bytecode) {
222 CHECK(Compiler::EnsureBytecode(&info));
220 info.MarkAsOptimizeFromBytecode(); 223 info.MarkAsOptimizeFromBytecode();
221 } else { 224 } else {
222 CHECK(Compiler::Analyze(info.parse_info())); 225 CHECK(Compiler::Analyze(info.parse_info()));
223 CHECK(Compiler::EnsureDeoptimizationSupport(&info)); 226 CHECK(Compiler::EnsureDeoptimizationSupport(&info));
224 } 227 }
225 JSFunction::EnsureLiterals(function); 228 JSFunction::EnsureLiterals(function);
226 229
227 Handle<Code> code = Pipeline::GenerateCodeForTesting(&info); 230 Handle<Code> code = Pipeline::GenerateCodeForTesting(&info);
228 CHECK(!code.is_null()); 231 CHECK(!code.is_null());
229 info.dependencies()->Commit(code); 232 info.dependencies()->Commit(code);
(...skipping 29 matching lines...) Expand all
259 CHECK(!code.is_null()); 262 CHECK(!code.is_null());
260 function->ReplaceCode(*code); 263 function->ReplaceCode(*code);
261 return function; 264 return function;
262 } 265 }
263 }; 266 };
264 } // namespace compiler 267 } // namespace compiler
265 } // namespace internal 268 } // namespace internal
266 } // namespace v8 269 } // namespace v8
267 270
268 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 271 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698