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

Unified Diff: src/parsing/parser.cc

Issue 2417643003: Turn AllowsLazyParsingWithoutUnresolvedVariables into a whitelist stopping at the outer parsed cont… (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
« no previous file with comments | « src/parsing/parser.h ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 292293987b0471c017bc28529440f6ae2b7a5e27..c6f23a7059c0400194245ffeec2936a881a2e30b 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -795,10 +795,6 @@ FunctionLiteral* Parser::DoParseProgram(ParseInfo* info) {
} else if (parsing_module_) {
DCHECK_EQ(outer, info->script_scope());
outer = NewModuleScope(info->script_scope());
- // Never do lazy parsing in modules. If we want to support this in the
- // future, we must force context-allocation for all variables that are
- // declared at the module level but not MODULE-allocated.
- parsing_mode = PARSE_EAGERLY;
}
DeclarationScope* scope = outer->AsDeclarationScope();
@@ -2625,7 +2621,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
eager_compile_hint == FunctionLiteral::kShouldLazyCompile;
bool is_lazy_top_level_function =
- can_preparse && scope()->AllowsLazyParsingWithoutUnresolvedVariables();
+ can_preparse && impl()->AllowsLazyParsingWithoutUnresolvedVariables();
// Determine whether we can still lazy parse the inner function.
// The preconditions are:
« no previous file with comments | « src/parsing/parser.h ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698