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

Unified Diff: src/parsing/parser.cc

Issue 2346363004: Reland Async/await Promise dependency graph (Closed)
Patch Set: Remove extra newlines Created 4 years, 3 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/js/promise.js ('k') | test/mjsunit/harmony/async-debug-caught-exception-cases.js » ('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 16d29c24df47b0222d2c42826cd6b17742e9c3a2..460411d5d50e664a2aeff7a7615dd070bb87c270 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -4564,7 +4564,7 @@ Expression* Parser::RewriteAwaitExpression(Expression* value, int await_pos) {
// yield do {
// promise_tmp = .promise;
// tmp = <operand>;
- // %AsyncFunctionAwait(.generator_object, tmp);
+ // %AsyncFunctionAwait(.generator_object, tmp, promise_tmp);
// promise_tmp
// }
// The value of the expression is returned to the caller of the async
@@ -4609,11 +4609,13 @@ Expression* Parser::RewriteAwaitExpression(Expression* value, int await_pos) {
zone());
ZoneList<Expression*>* async_function_await_args =
- new (zone()) ZoneList<Expression*>(2, zone());
+ new (zone()) ZoneList<Expression*>(3, zone());
Expression* generator_object =
factory()->NewVariableProxy(generator_object_variable);
async_function_await_args->Add(generator_object, zone());
async_function_await_args->Add(factory()->NewVariableProxy(temp_var), zone());
+ async_function_await_args->Add(factory()->NewVariableProxy(promise_temp_var),
+ zone());
// The parser emits calls to AsyncFunctionAwaitCaught, but the
// AstNumberingVisitor will rewrite this to AsyncFunctionAwaitUncaught
« no previous file with comments | « src/js/promise.js ('k') | test/mjsunit/harmony/async-debug-caught-exception-cases.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698