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

Unified Diff: src/compiler.cc

Issue 1804433004: [serializer] add options to compile eagerly and pre-age for code cache. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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/flag-definitions.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 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");
« no previous file with comments | « src/compiler.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698