Chromium Code Reviews| 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)) { |
|
neis
2017/05/24 10:39:36
This should be moved into MustAllocateInContext(va
Jarin
2017/05/24 12:32:21
I do not know this code well enough to say whether
adamk
2017/05/24 13:04:00
Indeed the problem is that MustAllocateInContext d
|
| DCHECK(var->IsUnallocated() || var->IsContextSlot()); |
| if (var->IsUnallocated()) { |
| AllocateHeapSlot(var); |