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/function-tester.h

Issue 2165223002: Revert of [Intepreter] Always use BytecodeGraphBuilder when --turbo-from-bytecode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 if (!FLAG_turbo_from_bytecode) { 211 CHECK(Parser::ParseStatic(info.parse_info()));
212 CHECK(Parser::ParseStatic(info.parse_info()));
213 }
214 info.SetOptimizing(); 212 info.SetOptimizing();
215 if (flags_ & CompilationInfo::kFunctionContextSpecializing) { 213 if (flags_ & CompilationInfo::kFunctionContextSpecializing) {
216 info.MarkAsFunctionContextSpecializing(); 214 info.MarkAsFunctionContextSpecializing();
217 } 215 }
218 if (flags_ & CompilationInfo::kInliningEnabled) { 216 if (flags_ & CompilationInfo::kInliningEnabled) {
219 info.MarkAsInliningEnabled(); 217 info.MarkAsInliningEnabled();
220 } 218 }
221 if (FLAG_turbo_from_bytecode) { 219 if (FLAG_turbo_from_bytecode && function->shared()->HasBytecodeArray()) {
222 CHECK(Compiler::EnsureBytecode(&info));
223 info.MarkAsOptimizeFromBytecode(); 220 info.MarkAsOptimizeFromBytecode();
224 } else { 221 } else {
225 CHECK(Compiler::Analyze(info.parse_info())); 222 CHECK(Compiler::Analyze(info.parse_info()));
226 CHECK(Compiler::EnsureDeoptimizationSupport(&info)); 223 CHECK(Compiler::EnsureDeoptimizationSupport(&info));
227 } 224 }
228 JSFunction::EnsureLiterals(function); 225 JSFunction::EnsureLiterals(function);
229 226
230 Handle<Code> code = Pipeline::GenerateCodeForTesting(&info); 227 Handle<Code> code = Pipeline::GenerateCodeForTesting(&info);
231 CHECK(!code.is_null()); 228 CHECK(!code.is_null());
232 info.dependencies()->Commit(code); 229 info.dependencies()->Commit(code);
(...skipping 29 matching lines...) Expand all
262 CHECK(!code.is_null()); 259 CHECK(!code.is_null());
263 function->ReplaceCode(*code); 260 function->ReplaceCode(*code);
264 return function; 261 return function;
265 } 262 }
266 }; 263 };
267 } // namespace compiler 264 } // namespace compiler
268 } // namespace internal 265 } // namespace internal
269 } // namespace v8 266 } // namespace v8
270 267
271 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 268 #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