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

Unified Diff: src/compiler.cc

Issue 2405813002: Allow lazy parsing of functions nested in eager compiled functions (Closed)
Patch Set: Rebase 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
« no previous file with comments | « src/ast/scopes.cc ('k') | src/parsing/parse-info.cc » ('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 cf556f237babe4642cd2d837aa75a99ce73b0e78..6e87d6a347dd16ef1ce8d2e21059bfe3de53dc97 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1055,17 +1055,9 @@ Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
// non-NULL). If compiling for debugging, we may eagerly compile inner
// functions, so do not parse lazily in that case.
ScriptCompiler::CompileOptions options = parse_info->compile_options();
- bool parse_allow_lazy = (options == ScriptCompiler::kConsumeParserCache ||
- String::cast(script->source())->length() >
- FLAG_min_preparse_length) &&
- !info->is_debug();
-
- // Consider parsing eagerly when targeting the code cache.
- parse_allow_lazy &= !(FLAG_serialize_eager && info->will_serialize());
-
- // Consider parsing eagerly when targeting Ignition.
- parse_allow_lazy &= !(FLAG_ignition && FLAG_ignition_eager &&
- !isolate->serializer_enabled());
+ bool parse_allow_lazy =
+ options == ScriptCompiler::kConsumeParserCache ||
+ String::cast(script->source())->length() > FLAG_min_preparse_length;
parse_info->set_allow_lazy_parsing(parse_allow_lazy);
if (!parse_allow_lazy &&
@@ -1084,8 +1076,6 @@ Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
}
}
- DCHECK(!info->is_debug() || !parse_info->allow_lazy_parsing());
-
FunctionLiteral* lit = parse_info->literal();
// Measure how long it takes to do the compilation; only take the
« no previous file with comments | « src/ast/scopes.cc ('k') | src/parsing/parse-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698