[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}
This commit is contained in:
parent
9d818bea60
commit
b3b574cd8c
@ -461,12 +461,6 @@ void DeclarationScope::Analyze(ParseInfo* info, AnalyzeMode mode) {
|
|||||||
scope->outer_scope()->scope_type() == SCRIPT_SCOPE ||
|
scope->outer_scope()->scope_type() == SCRIPT_SCOPE ||
|
||||||
scope->outer_scope()->already_resolved_);
|
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);
|
scope->AllocateVariables(info, mode);
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
Loading…
Reference in New Issue
Block a user