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

Unified Diff: src/parsing/func-name-inferrer.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: a better/cheaper mechanic 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
Index: src/parsing/func-name-inferrer.cc
diff --git a/src/parsing/func-name-inferrer.cc b/src/parsing/func-name-inferrer.cc
index 12013afd282bec18a947c21a167b9b9f0452ac27..1a0a690a04dfb1597a6d55ebd9eba1306334f74c 100644
--- a/src/parsing/func-name-inferrer.cc
+++ b/src/parsing/func-name-inferrer.cc
@@ -20,7 +20,6 @@ FuncNameInferrer::FuncNameInferrer(AstValueFactory* ast_value_factory,
zone_(zone) {
}
-
Dan Ehrenberg 2016/08/12 21:29:58 Nit: Revert irrelevant whitespace change.
void FuncNameInferrer::PushEnclosingName(const AstRawString* name) {
// Enclosing name is a name of a constructor function. To check
// that it is really a constructor, we check that it is not empty
@@ -44,6 +43,12 @@ void FuncNameInferrer::PushVariableName(const AstRawString* name) {
}
}
+void FuncNameInferrer::RemoveAsyncKeywordAtIndex(int index) {
+ DCHECK(index >= 0);
+ DCHECK(index < names_stack_.length());
+ DCHECK(names_stack_.at(index).name->IsOneByteEqualTo("async"));
+ names_stack_.Remove(index);
+}
const AstString* FuncNameInferrer::MakeNameFromStack() {
return MakeNameFromStackHelper(0, ast_value_factory_->empty_string());

Powered by Google App Engine
This is Rietveld 408576698