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

Unified Diff: src/ast/scopes.cc

Issue 1537683002: Partial revert of rest parameter desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test failures. Created 5 years 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/bailout-reason.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 42f7972742c1a8f0b5113759c6b1993c48595cda..21c9e2e373b5408c58fa61b646cbe1d39c3a1e20 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -205,6 +205,7 @@ void Scope::SetDefaults(ScopeType scope_type, Scope* outer_scope,
arity_ = 0;
has_simple_parameters_ = true;
rest_parameter_ = NULL;
+ rest_index_ = -1;
scope_info_ = scope_info;
start_position_ = RelocInfo::kNoPosition;
end_position_ = RelocInfo::kNoPosition;
@@ -521,6 +522,7 @@ Variable* Scope::DeclareParameter(
if (is_rest) {
DCHECK_NULL(rest_parameter_);
rest_parameter_ = var;
+ rest_index_ = num_parameters();
}
params_.Add(var, zone());
return var;
« no previous file with comments | « src/ast/scopes.h ('k') | src/bailout-reason.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698