Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 47b555c27706a8d9c65f53f856a9c4b3afaac916..d4e1d412e9003f5ceb9564466b49a21f57a7ccb3 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -1410,6 +1410,9 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) { |
FLAG_min_preparse_length) && |
!info->is_debug(); |
+ // Consider parsing eagerly when targeting the code cache. |
+ parse_allow_lazy &= !(FLAG_serialize_eager && info->will_serialize()); |
+ |
parse_info->set_allow_lazy_parsing(parse_allow_lazy); |
if (!parse_allow_lazy && |
(options == ScriptCompiler::kProduceParserCache || |
@@ -1770,6 +1773,9 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfo( |
bool lazy = FLAG_lazy && allow_lazy && !literal->should_eager_compile(); |
+ // Consider compiling eagerly when targeting the code cache. |
+ lazy &= !(FLAG_serialize_eager && info.will_serialize()); |
+ |
// Generate code |
TimerEventScope<TimerEventCompileCode> timer(isolate); |
TRACE_EVENT0("v8", "V8.CompileCode"); |