| Index: src/parsing/preparser.cc
|
| diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
|
| index b09488715464d470988788edc0d7ffde93a49509..d7ba88cc6049d2bfb7d0fa2c663e362a99c44c12 100644
|
| --- a/src/parsing/preparser.cc
|
| +++ b/src/parsing/preparser.cc
|
| @@ -121,6 +121,7 @@ PreParser::PreParseResult PreParser::PreParseLazyFunction(
|
| DCHECK_EQ(Token::LBRACE, scanner()->current_token());
|
| bool ok = true;
|
| int start_position = peek_position();
|
| + function_state.set_parse_phase(FunctionParsePhase::FunctionBody);
|
| ParseLazyFunctionLiteralBody(&ok, bookmark);
|
| use_counts_ = nullptr;
|
| if (bookmark && bookmark->HasBeenReset()) {
|
| @@ -1105,6 +1106,7 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
|
| int start_position = scanner()->location().beg_pos;
|
| function_scope->set_start_position(start_position);
|
| PreParserFormalParameters formals(function_scope);
|
| + function_state.set_parse_phase(FunctionParsePhase::FormalParameters);
|
| ParseFormalParameterList(&formals, &formals_classifier, CHECK_OK);
|
| Expect(Token::RPAREN, CHECK_OK);
|
| int formals_end_position = scanner()->location().end_pos;
|
| @@ -1117,6 +1119,7 @@ PreParser::Expression PreParser::ParseFunctionLiteral(
|
| bool is_lazily_parsed = (outer_is_script_scope && allow_lazy() &&
|
| !function_state_->this_function_is_parenthesized());
|
|
|
| + function_state.set_parse_phase(FunctionParsePhase::FunctionBody);
|
| Expect(Token::LBRACE, CHECK_OK);
|
| if (is_lazily_parsed) {
|
| ParseLazyFunctionLiteralBody(CHECK_OK);
|
| @@ -1290,6 +1293,19 @@ PreParserExpression PreParser::ParseDoExpression(bool* ok) {
|
| return PreParserExpression::Default();
|
| }
|
|
|
| +void PreParserTraits::ParseAsyncArrowSingleExpressionBody(
|
| + PreParserStatementList body, bool accept_IN,
|
| + Type::ExpressionClassifier* classifier, int pos, bool* ok) {
|
| + Scope* scope = pre_parser_->scope_;
|
| + scope->ForceContextAllocation();
|
| +
|
| + PreParserExpression return_value =
|
| + pre_parser_->ParseAssignmentExpression(accept_IN, classifier, ok);
|
| + if (!*ok) return;
|
| +
|
| + body->Add(PreParserStatement::ExpressionStatement(return_value), zone());
|
| +}
|
| +
|
| #undef CHECK_OK
|
|
|
|
|
|
|