Commit 1c6cb5a4 authored by verwaest's avatar verwaest Committed by Commit bot

Always inherit language-mode from the outer scope, modules initialize language-mode later

BUG=v8:5209

Review-Url: https://codereview.chromium.org/2253093002
Cr-Commit-Position: refs/heads/master@{#38685}
parent 7fe4d930
......@@ -89,9 +89,7 @@ Scope::Scope(Zone* zone, Scope* outer_scope, ScopeType scope_type)
DCHECK_EQ(SCRIPT_SCOPE, scope_type);
} else {
asm_function_ = outer_scope_->asm_module_;
// Inherit the language mode from the parent scope unless we're a module
// scope.
if (!is_module_scope()) language_mode_ = outer_scope->language_mode_;
language_mode_ = outer_scope->language_mode_;
force_context_allocation_ =
!is_function_scope() && outer_scope->has_forced_context_allocation();
outer_scope_->AddInnerScope(this);
......
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