Commit b3b574cd authored by neis's avatar neis Committed by Commit bot

[modules] Ignore the surrounding script scope.

This is more consistent with how we handle eval scripts.

R=jochen@chromium.org
BUG=v8:1569

Review-Url: https://codereview.chromium.org/2289293006
Cr-Commit-Position: refs/heads/master@{#39069}
parent 9d818bea
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment