| Index: src/scopes.h
|
| diff --git a/src/scopes.h b/src/scopes.h
|
| index 7a013e96c7ffd63aa9ceb4073a7cf7a3e044a467..72055a3225b86290a5c91ccab776ea2067f8fd87 100644
|
| --- a/src/scopes.h
|
| +++ b/src/scopes.h
|
| @@ -126,7 +126,7 @@ class Scope: public ZoneObject {
|
| // parameters the rightmost one 'wins'. However, the implementation
|
| // expects all parameters to be declared and from left to right.
|
| Variable* DeclareParameter(const AstRawString* name, VariableMode mode,
|
| - bool is_rest, bool* is_duplicate);
|
| + bool is_rest, bool* is_duplicate, int pos);
|
|
|
| // Declare a local variable in this scope. If the variable has been
|
| // declared before, the previously declared variable is returned.
|
| @@ -141,6 +141,8 @@ class Scope: public ZoneObject {
|
| // with statements or eval calls.
|
| Variable* DeclareDynamicGlobal(const AstRawString* name);
|
|
|
| + void ShadowParametersForExpressions();
|
| +
|
| // Create a new unresolved variable.
|
| VariableProxy* NewUnresolved(AstNodeFactory* factory,
|
| const AstRawString* name,
|
| @@ -366,6 +368,11 @@ class Scope: public ZoneObject {
|
| return params_[index];
|
| }
|
|
|
| + int parameter_position(int index) const {
|
| + DCHECK(is_function_scope());
|
| + return param_positions_[index];
|
| + }
|
| +
|
| // Returns the default function arity --- does not include rest parameters.
|
| int default_function_length() const {
|
| int count = params_.length();
|
| @@ -545,6 +552,7 @@ class Scope: public ZoneObject {
|
| ZoneList<Variable*> temps_;
|
| // Parameter list in source order.
|
| ZoneList<Variable*> params_;
|
| + ZoneList<int> param_positions_;
|
| // Variables that must be looked up dynamically.
|
| DynamicScopePart* dynamics_;
|
| // Unresolved variables referred to from this scope.
|
|
|