| Index: src/preparser.cc
|
| diff --git a/src/preparser.cc b/src/preparser.cc
|
| index 950f7b50ec35ca6a255788dac4b1aecccdef9086..d9f117ca8b0438086a22895437fe55e24459f766 100644
|
| --- a/src/preparser.cc
|
| +++ b/src/preparser.cc
|
| @@ -983,6 +983,7 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
|
| // Parse function body.
|
| bool outer_is_script_scope = scope_->is_script_scope();
|
| Scope* function_scope = NewScope(scope_, FUNCTION_SCOPE);
|
| + Scope* parameter_scope = NewScope(function_scope, PARAMETER_SCOPE);
|
| PreParserFactory factory(NULL);
|
| FunctionState function_state(&function_state_, &scope_, function_scope, kind,
|
| &factory);
|
| @@ -995,8 +996,12 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
|
| int num_parameters;
|
| {
|
| DuplicateFinder duplicate_finder(scanner()->unicode_cache());
|
| - num_parameters = ParseFormalParameterList(&duplicate_finder, &error_locs,
|
| - &is_rest, CHECK_OK);
|
| + PreParserExpressionList initializers = NewExpressionList(0, zone());
|
| + bool has_initializers = false;
|
| +
|
| + num_parameters = ParseFormalParameterList(
|
| + &duplicate_finder, parameter_scope, &error_locs, initializers,
|
| + &has_initializers, &is_rest, CHECK_OK);
|
| }
|
| Expect(Token::RPAREN, CHECK_OK);
|
| int formals_end_position = scanner()->location().end_pos;
|
|
|