Index: src/parsing/parser-base.h |
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
index c7e4daf97c2b555056c1e17d9d7d78d09df19f0f..c05cc8762c1e8daa1757937fd09067fc2feae6ad 100644 |
--- a/src/parsing/parser-base.h |
+++ b/src/parsing/parser-base.h |
@@ -2327,6 +2327,11 @@ ParserBase<Traits>::ParseAssignmentExpression(bool accept_IN, |
ParseAndClassifyIdentifier(&arrow_formals_classifier, CHECK_OK); |
expression = this->ExpressionFromIdentifier(name, position(), |
scanner()->location().end_pos); |
+ if (fni_) { |
+ // Remove `async` and the argument name from the inferred name. |
+ fni_->RemoveLastName(); |
+ fni_->RemoveLastName(); |
Dan Ehrenberg
2016/08/12 00:39:21
I'm surprised that you have to remove two names he
caitp
2016/08/12 01:12:27
well, the `async` is removed on line 2896. As for
|
+ } |
} |
if (peek() == Token::ARROW) { |
@@ -2883,9 +2888,13 @@ ParserBase<Traits>::ParseLeftHandSideExpression( |
Scanner::Location spread_pos; |
typename Traits::Type::ExpressionList args; |
if (V8_UNLIKELY(is_async)) { |
+ int async_index = fni_ ? fni_->LastNameIndex() : -1; |
ExpressionClassifier async_classifier(this); |
args = ParseArguments(&spread_pos, true, &async_classifier, CHECK_OK); |
if (peek() == Token::ARROW) { |
+ if (fni_) { |
+ fni_->RemoveNameAtIndex(async_index); |
+ } |
ValidateBindingPattern(&async_classifier, CHECK_OK); |
if (!async_classifier.is_valid_async_arrow_formal_parameters()) { |
ReportClassifierError( |