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

Unified Diff: src/parsing/parser.h

Issue 1841543003: [esnext] implement frontend changes for async/await proposal (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Uncomment that test Created 4 years, 7 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/expression-classifier.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index aa2d0e87cedd1df11a6e7e2387be095ea5a25405..e91ad7741aa298c40ae7fbe505286289905f2748 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -355,6 +355,7 @@ class ParserTraits {
bool IsArguments(const AstRawString* identifier) const;
bool IsEvalOrArguments(const AstRawString* identifier) const;
bool IsUndefined(const AstRawString* identifier) const;
+ bool IsAwait(const AstRawString* identifier) const;
V8_INLINE bool IsFutureStrictReserved(const AstRawString* identifier) const;
// Returns true if the expression is of type "this.foo".
@@ -554,6 +555,8 @@ class ParserTraits {
const Scanner::Location& params_loc,
Scanner::Location* duplicate_loc, bool* ok);
+ V8_INLINE Expression* ParseAsyncFunctionExpression(bool* ok);
+
V8_INLINE DoExpression* ParseDoExpression(bool* ok);
void ReindexLiterals(const ParserFormalParameters& parameters);
@@ -637,6 +640,8 @@ class ParserTraits {
ZoneList<v8::internal::Expression*>* args,
int pos);
+ Expression* ExpressionListToExpression(ZoneList<Expression*>* args);
+
// Rewrite all DestructuringAssignments in the current FunctionState.
V8_INLINE void RewriteDestructuringAssignments();
@@ -645,6 +650,8 @@ class ParserTraits {
V8_INLINE Expression* RewriteAssignExponentiation(Expression* left,
Expression* right, int pos);
+ V8_INLINE Expression* RewriteAwaitExpression(Expression* value, int pos);
+
V8_INLINE void QueueDestructuringAssignmentForRewriting(
Expression* assignment);
V8_INLINE void QueueNonPatternForRewriting(Expression* expr);
@@ -772,7 +779,13 @@ class Parser : public ParserBase<ParserTraits> {
Statement* ParseFunctionDeclaration(bool* ok);
Statement* ParseHoistableDeclaration(ZoneList<const AstRawString*>* names,
bool* ok);
- Statement* ParseHoistableDeclaration(int pos, bool is_generator,
+ Statement* ParseHoistableDeclaration(int pos, ParseFunctionFlags flags,
+ ZoneList<const AstRawString*>* names,
+ bool* ok);
+ Statement* ParseAsyncFunctionDeclaration(ZoneList<const AstRawString*>* names,
+ bool* ok);
+ Expression* ParseAsyncFunctionExpression(bool* ok);
+ Statement* ParseFunctionDeclaration(int pos, bool is_generator,
ZoneList<const AstRawString*>* names,
bool* ok);
Statement* ParseClassDeclaration(ZoneList<const AstRawString*>* names,
@@ -1255,6 +1268,9 @@ void ParserTraits::AddParameterInitializationBlock(
}
}
+Expression* ParserTraits::ParseAsyncFunctionExpression(bool* ok) {
+ return parser_->ParseAsyncFunctionExpression(ok);
+}
DoExpression* ParserTraits::ParseDoExpression(bool* ok) {
return parser_->ParseDoExpression(ok);
« no previous file with comments | « src/parsing/expression-classifier.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698