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

Unified Diff: src/compiler.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler.h ('k') | src/runtime-profiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 0d85844760ce766de43e4c409bb656c31eb991d5..426752e4bffdab40c0bef8a0df58be1f20184a68 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -441,7 +441,7 @@
info->literal()->feedback_vector_spec()));
}
-bool ShouldUseIgnition(CompilationInfo* info) {
+bool UseIgnition(CompilationInfo* info) {
DCHECK(info->has_shared_info());
// When requesting debug code as a replacement for existing code, we provide
@@ -489,7 +489,7 @@
return true;
}
}
- if (FLAG_ignition && ShouldUseIgnition(info)) {
+ if (FLAG_ignition && UseIgnition(info)) {
success = interpreter::Interpreter::MakeBytecode(info);
} else {
success = FullCodeGenerator::MakeCode(info);
@@ -801,11 +801,8 @@
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.OptimizeCode");
// TurboFan can optimize directly from existing bytecode.
- if (FLAG_turbo_from_bytecode && use_turbofan && ShouldUseIgnition(info)) {
- if (!Compiler::EnsureBytecode(info)) {
- if (isolate->has_pending_exception()) isolate->clear_pending_exception();
- return MaybeHandle<Code>();
- }
+ if (FLAG_turbo_from_bytecode && use_turbofan &&
+ info->shared_info()->HasBytecodeArray()) {
info->MarkAsOptimizeFromBytecode();
}
@@ -1347,16 +1344,6 @@
return infos;
}
-bool Compiler::EnsureBytecode(CompilationInfo* info) {
- DCHECK(ShouldUseIgnition(info));
- if (!info->shared_info()->HasBytecodeArray()) {
- DCHECK(!info->shared_info()->is_compiled());
- if (GetUnoptimizedCode(info).is_null()) return false;
- }
- DCHECK(info->shared_info()->HasBytecodeArray());
- return true;
-}
-
// TODO(turbofan): In the future, unoptimized code with deopt support could
// be generated lazily once deopt is triggered.
bool Compiler::EnsureDeoptimizationSupport(CompilationInfo* info) {
@@ -1416,20 +1403,6 @@
&unoptimized);
}
return true;
-}
-
-// static
-Compiler::CompilationTier Compiler::NextCompilationTier(JSFunction* function) {
- Handle<SharedFunctionInfo> shared(function->shared(), function->GetIsolate());
- if (shared->code()->is_interpreter_trampoline_builtin()) {
- if (FLAG_turbo_from_bytecode && UseTurboFan(shared)) {
- return OPTIMIZED;
- } else {
- return BASELINE;
- }
- } else {
- return OPTIMIZED;
- }
}
MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
« no previous file with comments | « src/compiler.h ('k') | src/runtime-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698