Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Unified Diff: src/parsing/parser.cc

Issue 2235423003: [parser] improve inferred function names for async arrow functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add braces around single-line if stmt Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/parser.h ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index 0d16469f3190e582d399752cf5387926922d268a..6384194445c34441bae1df8e15e6d06c9da5a16c 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -766,8 +766,11 @@ Literal* ParserTraits::ExpressionFromLiteral(Token::Value token, int pos,
Expression* ParserTraits::ExpressionFromIdentifier(const AstRawString* name,
int start_position,
- int end_position) {
- if (parser_->fni_ != NULL) parser_->fni_->PushVariableName(name);
+ int end_position,
+ InferName infer) {
+ if (infer == InferName::Yes && parser_->fni_ != NULL) {
+ parser_->fni_->PushVariableName(name);
+ }
return parser_->NewUnresolved(name, start_position, end_position);
}
« no previous file with comments | « src/parsing/parser.h ('k') | src/parsing/parser-base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698