Index: src/parser.h |
diff --git a/src/parser.h b/src/parser.h |
index 1a84ec4157aff1210e7a8aeb2458d6d4cd91a2e8..70bdfab9311a62fed82aeb43132d3e5fce012ec2 100644 |
--- a/src/parser.h |
+++ b/src/parser.h |
@@ -746,9 +746,10 @@ class ParserTraits { |
FunctionKind kind = kNormalFunction); |
bool DeclareFormalParameter(Scope* scope, const AstRawString* name, |
- bool is_rest) { |
+ bool is_rest, int pos) { |
bool is_duplicate = false; |
- Variable* var = scope->DeclareParameter(name, VAR, is_rest, &is_duplicate); |
+ Variable* var = |
+ scope->DeclareParameter(name, VAR, is_rest, &is_duplicate, pos); |
if (is_sloppy(scope->language_mode())) { |
// TODO(sigurds) Mark every parameter as maybe assigned. This is a |
// conservative approximation necessary to account for parameters |
@@ -979,6 +980,9 @@ class Parser : public ParserBase<ParserTraits> { |
ForStatement* loop, Statement* init, Expression* cond, Statement* next, |
Statement* body, bool* ok); |
+ ZoneList<Statement*>* DesugarInitializeParameters( |
+ Scope* scope, bool has_initializers, ZoneList<Expression*>* initializers); |
+ |
FunctionLiteral* ParseFunctionLiteral( |
const AstRawString* name, Scanner::Location function_name_location, |
bool name_is_strict_reserved, FunctionKind kind, |
@@ -1012,6 +1016,10 @@ class Parser : public ParserBase<ParserTraits> { |
VariableProxy* NewUnresolved(const AstRawString* name, VariableMode mode); |
Variable* Declare(Declaration* declaration, bool resolve, bool* ok); |
+ // Parameters have expressions --- ensure that the declared parameters can |
+ // never be resolved |
+ void ShadowParametersForExpressions(Scope* scope); |
+ |
bool TargetStackContainsLabel(const AstRawString* label); |
BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); |
IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); |