Index: src/ast/scopes.cc |
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc |
index dad43db911f62de4aa469268b214c712f988195c..533268fab5cfc2f7ebe60223afe0d2659502543e 100644 |
--- a/src/ast/scopes.cc |
+++ b/src/ast/scopes.cc |
@@ -348,6 +348,7 @@ void Scope::SetDefaults() { |
inner_scope_calls_eval_ = false; |
force_context_allocation_ = false; |
+ force_context_allocation_for_parameters_ = false; |
is_declaration_scope_ = false; |
@@ -2193,7 +2194,8 @@ void DeclarationScope::AllocateParameterLocals() { |
void DeclarationScope::AllocateParameter(Variable* var, int index) { |
if (MustAllocate(var)) { |
- if (MustAllocateInContext(var)) { |
+ if (has_forced_context_allocation_for_parameters() || |
+ MustAllocateInContext(var)) { |
DCHECK(var->IsUnallocated() || var->IsContextSlot()); |
if (var->IsUnallocated()) { |
AllocateHeapSlot(var); |