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

Unified Diff: src/compiler.cc

Issue 2399833002: Teach Scopes whether they will end up being lazily compiled or not (Closed)
Patch Set: Created 4 years, 2 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
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index ec402fa82209339f2bddfcee9066b7e17ef90763..2673fee1a1d19e5c20978761cbbd84ddb8c2c612 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1431,6 +1431,7 @@ bool Compiler::EnsureDeoptimizationSupport(CompilationInfo* info) {
RecordFunctionCompilation(CodeEventListener::LAZY_COMPILE_TAG,
&unoptimized);
}
+ info->parse_info()->set_will_serialize(false);
marja 2016/10/06 11:53:06 Why is this needed, shouldn't there be a default t
jochen (gone - plz use gerrit) 2016/10/06 15:05:04 In EnsureDeoptimizationSupport we might recompile
marja 2016/10/07 08:25:59 Offline discussion: this code for resetting the fl
return true;
}
@@ -1794,6 +1795,8 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfo(
lazy &=
!(FLAG_ignition && FLAG_ignition_eager && !isolate->serializer_enabled());
+ DCHECK_EQ(lazy, literal->scope()->should_compile_lazily());
+
// Generate code
TimerEventScope<TimerEventCompileCode> timer(isolate);
RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::CompileCode);

Powered by Google App Engine
This is Rietveld 408576698