| Index: src/scopes.h
|
| diff --git a/src/scopes.h b/src/scopes.h
|
| index 7b372d9643fe4c1c07892139c6ecf1937ed1257e..12362959db4ada59ee3390dd248d0d8b7031f9db 100644
|
| --- a/src/scopes.h
|
| +++ b/src/scopes.h
|
| @@ -87,6 +87,10 @@ class Scope: public ZoneObject {
|
| scope_name_ = scope_name;
|
| }
|
|
|
| + // Mark the current scope as a scope for evaluating function parameter
|
| + // expressions (such as initializers for optional parameters)
|
| + void SetParameterExpressionsScopeFor(Scope* function_scope);
|
| +
|
| void Initialize();
|
|
|
| // Checks if the block scope is redundant, i.e. it does not contain any
|
| @@ -125,7 +129,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 = false);
|
| + ParameterKind kind = NormalParameter);
|
|
|
| // Declare a local variable in this scope. If the variable has been
|
| // declared before, the previously declared variable is returned.
|
| @@ -509,6 +513,11 @@ class Scope: public ZoneObject {
|
|
|
| // Scope tree.
|
| Scope* outer_scope_; // the immediately enclosing outer scope, or NULL
|
| +
|
| + // function scope to search for parameters. This auxiliary scope enables TDZ
|
| + // semantics for parameters while evaluating parameter expressions.
|
| + Scope* parameter_scope_;
|
| +
|
| ZoneList<Scope*> inner_scopes_; // the immediately enclosed inner scopes
|
|
|
| // The scope type.
|
|
|