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; |