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

Unified Diff: src/parsing/parser.cc

Issue 2373573003: [modules] Never do lazy parsing in modules. (Closed)
Patch Set: Different approach. Created 4 years, 3 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 | « no previous file | test/mjsunit/modules-preparse.js » ('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 16c6b36ab41186307ae09cb3ccd27e0121c8f65a..080ae357e18e60b7ec510fa1bb7b6bae2c54ad04 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -768,6 +768,10 @@ FunctionLiteral* Parser::DoParseProgram(ParseInfo* info) {
} else if (info->is_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();
« no previous file with comments | « no previous file | test/mjsunit/modules-preparse.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698