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(); |