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

Unified Diff: src/parsing/preparser.cc

Issue 1895603002: [esnext] prototype runtime implementation for async functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@AsyncFunction
Patch Set: fix some nits 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/preparser.h ('k') | src/runtime/runtime-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/preparser.cc
diff --git a/src/parsing/preparser.cc b/src/parsing/preparser.cc
index e109dab67e03a9f37493879d4f3d2f1f66bb713b..326f2044ccd5d99654221629ce52305d63c6f52b 100644
--- a/src/parsing/preparser.cc
+++ b/src/parsing/preparser.cc
@@ -1293,6 +1293,19 @@ PreParserExpression PreParser::ParseDoExpression(bool* ok) {
return PreParserExpression::Default();
}
+void PreParserTraits::ParseAsyncArrowSingleExpressionBody(
+ PreParserStatementList body, bool accept_IN,
+ Type::ExpressionClassifier* classifier, int pos, bool* ok) {
+ Scope* scope = pre_parser_->scope_;
+ scope->ForceContextAllocation();
+
+ PreParserExpression return_value =
+ pre_parser_->ParseAssignmentExpression(accept_IN, classifier, ok);
+ if (!*ok) return;
+
+ body->Add(PreParserStatement::ExpressionStatement(return_value), zone());
+}
+
#undef CHECK_OK
« no previous file with comments | « src/parsing/preparser.h ('k') | src/runtime/runtime-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698