Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: src/ast/scopes.cc

Issue 2898163002: Make non-Module generators only context allocate parameters. (Closed)
Patch Set: Rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast/scopes.h ('k') | src/debug/debug-scopes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/ast/scopes.h ('k') | src/debug/debug-scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698