diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc index 02b3433526..897d62c4da 100644 --- a/src/ast/scopes.cc +++ b/src/ast/scopes.cc @@ -461,12 +461,6 @@ void DeclarationScope::Analyze(ParseInfo* info, AnalyzeMode mode) { scope->outer_scope()->scope_type() == SCRIPT_SCOPE || scope->outer_scope()->already_resolved_); - // For modules, we want to start variable allocation at the surrounding script - // scope. - if (scope->is_module_scope()) { - scope = scope->outer_scope()->AsDeclarationScope(); - } - scope->AllocateVariables(info, mode); #ifdef DEBUG