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

Unified Diff: src/ast/scopes.cc

Issue 2289293006: [modules] Ignore the surrounding script scope. (Closed)
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index 02b34335265bf72633fe0dc1486141b8d1aeae00..897d62c4da942db73caaaeab5ee8e273d4745f90 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698