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

Unified Diff: src/parsing/parser.h

Issue 2233923003: Desugar async/await to create the resulting Promise upfront (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix polarity of async function rejections 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/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index b069f9af980014a879e2cb18e424036ae7e05156..11310d61a567dff55f8e96712c1849e982d789d9 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -768,7 +768,7 @@ class Parser : public ParserBase<Parser> {
Block* BuildParameterInitializationBlock(
const ParserFormalParameters& parameters, bool* ok);
- Block* BuildRejectPromiseOnException(Block* block);
+ Block* BuildRejectPromiseOnException(Block* block, bool* ok);
// Consumes the ending }.
ZoneList<Statement*>* ParseEagerFunctionBody(
@@ -862,8 +862,10 @@ class Parser : public ParserBase<Parser> {
void RewriteParameterInitializer(Expression* expr, Scope* scope);
Expression* BuildCreateJSGeneratorObject(int pos, FunctionKind kind);
- Expression* BuildPromiseResolve(Expression* value, int pos);
- Expression* BuildPromiseReject(Expression* value, int pos);
+ Expression* BuildResolvePromise(Expression* value, int pos);
+ Expression* BuildRejectPromise(Expression* value, int pos);
+ VariableProxy* BuildDotPromise();
+ VariableProxy* BuildDebugIsActive();
// Generic AST generator for throwing errors from compiled code.
Expression* NewThrowError(Runtime::FunctionId function_id,
@@ -1000,7 +1002,8 @@ void ParserBaseTraits<Parser>::AddParameterInitializationBlock(
if (!*ok) return;
if (is_async) {
- init_block = delegate()->BuildRejectPromiseOnException(init_block);
+ init_block = delegate()->BuildRejectPromiseOnException(init_block, ok);
+ if (!*ok) return;
}
if (init_block != nullptr) {

Powered by Google App Engine
This is Rietveld 408576698