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

Unified Diff: src/compiler.cc

Issue 2405813002: Allow lazy parsing of functions nested in eager compiled functions (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 1fc510a53ea69019c050f85dad13bffb10e9caa3..8f02db1f2f7b539458f9b0c9602d27fc6056b89c 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1056,17 +1056,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 &&
@@ -1085,8 +1077,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') | src/parsing/parse-info.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698