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

Unified Diff: src/parsing/parser.h

Issue 2672313003: [async await] fix async await desugaring
Patch Set: fmt Created 3 years, 10 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 | « no previous file | 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 20c79371822276d08a8b1691a4855a9fb090ad59..81c4255aafc053940d1391335735057c9a4bdd3c 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -543,6 +543,7 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
Block* BuildParameterInitializationBlock(
const ParserFormalParameters& parameters, bool* ok);
Block* BuildRejectPromiseOnException(Block* block);
+ Block* BuildRejectPromiseOnExceptionForParameters(Block* block);
ZoneList<Statement*>* ParseFunction(
const AstRawString* function_name, int pos, FunctionKind kind,
@@ -628,9 +629,10 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
Expression* BuildInitialYield(int pos, FunctionKind kind);
Assignment* BuildCreateJSGeneratorObject(int pos, FunctionKind kind);
- Expression* BuildResolvePromise(Expression* value, int pos);
- Expression* BuildRejectPromise(Expression* value, int pos);
+ Expression* BuildResolvePromise();
+ Expression* BuildRejectPromise(Variable* value);
Variable* PromiseVariable();
+ Variable* AsyncReturnVariable();
// Generic AST generator for throwing errors from compiled code.
Expression* NewThrowError(Runtime::FunctionId function_id,
@@ -1042,7 +1044,7 @@ class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) {
auto* init_block = BuildParameterInitializationBlock(parameters, ok);
if (!*ok) return;
if (is_async) {
- init_block = BuildRejectPromiseOnException(init_block);
+ init_block = BuildRejectPromiseOnExceptionForParameters(init_block);
}
if (init_block != nullptr) body->Add(init_block, zone());
}
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698