| Index: src/parsing/preparser.cc
|
| diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
|
| index d90d943d9fb70ac6b1b7377590ca68388ee3a50e..77a39dc70dba1a5f0721fe3d9ec9ec79826e1e65 100644
|
| --- a/src/parsing/preparser.cc
|
| +++ b/src/parsing/preparser.cc
|
| @@ -403,13 +403,6 @@ PreParser::Statement PreParser::ParseHoistableDeclaration(
|
| Identifier name = ParseIdentifierOrStrictReservedWord(
|
| &is_strict_reserved, CHECK_OK);
|
|
|
| - if (V8_UNLIKELY(is_async_function() && this->IsAwait(name))) {
|
| - ReportMessageAt(scanner()->location(),
|
| - MessageTemplate::kAwaitBindingIdentifier);
|
| - *ok = false;
|
| - return Statement::Default();
|
| - }
|
| -
|
| ParseFunctionLiteral(name, scanner()->location(),
|
| is_strict_reserved ? kFunctionNameIsStrictReserved
|
| : kFunctionNameValidityUnknown,
|
| @@ -1162,13 +1155,8 @@ PreParser::Expression PreParser::ParseAsyncFunctionExpression(bool* ok) {
|
|
|
| if (peek_any_identifier()) {
|
| type = FunctionLiteral::kNamedExpression;
|
| - name = ParseIdentifierOrStrictReservedWord(&is_strict_reserved, CHECK_OK);
|
| - if (this->IsAwait(name)) {
|
| - ReportMessageAt(scanner()->location(),
|
| - MessageTemplate::kAwaitBindingIdentifier);
|
| - *ok = false;
|
| - return Expression::Default();
|
| - }
|
| + name = ParseIdentifierOrStrictReservedWord(FunctionKind::kAsyncFunction,
|
| + &is_strict_reserved, CHECK_OK);
|
| }
|
|
|
| ParseFunctionLiteral(name, scanner()->location(),
|
|
|