Commit 3aa86289 authored by adamk's avatar adamk Committed by Commit bot

[cleanup] Remove cruft from old rest parameter implementation

Review URL: https://codereview.chromium.org/1485823003

Cr-Commit-Position: refs/heads/master@{#32535}
parent b2ad33c2
......@@ -263,7 +263,6 @@ class AstValue : public ZoneObject {
F(next, "next") \
F(proto, "__proto__") \
F(prototype, "prototype") \
F(rest_parameter, ".rest_parameter") \
F(this, "this") \
F(this_function, ".this_function") \
F(undefined, "undefined") \
......
......@@ -205,7 +205,6 @@ 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;
......@@ -522,7 +521,6 @@ Variable* Scope::DeclareParameter(
if (is_rest) {
DCHECK_NULL(rest_parameter_);
rest_parameter_ = var;
rest_index_ = num_parameters();
}
params_.Add(var, zone());
return var;
......
......@@ -420,17 +420,6 @@ class Scope: public ZoneObject {
int num_parameters() const { return params_.length(); }
// A function can have at most one rest parameter. Returns Variable* or NULL.
Variable* rest_parameter(int* index) const {
*index = rest_index_;
if (rest_index_ < 0) return NULL;
return rest_parameter_;
}
bool has_rest_parameter() const {
return rest_index_ >= 0;
}
bool has_simple_parameters() const {
return has_simple_parameters_;
}
......@@ -690,7 +679,6 @@ class Scope: public ZoneObject {
int arity_;
bool has_simple_parameters_;
Variable* rest_parameter_;
int rest_index_;
// Serialized scope info support.
Handle<ScopeInfo> scope_info_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment