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

Unified Diff: src/builtins/builtins-promise.h

Issue 2622833002: WIP [esnext] implement async iteration proposal (Closed)
Patch Set: Created 3 years, 11 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/builtins/builtins-promise.h
diff --git a/src/builtins/builtins-promise.h b/src/builtins/builtins-promise.h
index 00d57c73b1d68e90a2000bbc94647523a031de37..4feffb79ace6065c14f37e907c5b3d13baed4282 100644
--- a/src/builtins/builtins-promise.h
+++ b/src/builtins/builtins-promise.h
@@ -26,6 +26,11 @@ class PromiseBuiltinsAssembler : public CodeStubAssembler {
// init hook.
Node* AllocateAndInitJSPromise(Node* context, Node* parent);
+ // Allocate and initialize a Promise with pending state and undefined fields,
+ // without invoking Promise Hooks. This is suitable for internal Promises
+ // not exposed to JS code.
+ Node* AllocateAndInitInternalJSPromise(Node* context);
+
// This allocates and initializes a promise with the given state and
// fields.
Node* AllocateAndSetJSPromise(Node* context, Node* status, Node* result);
@@ -57,6 +62,11 @@ class PromiseBuiltinsAssembler : public CodeStubAssembler {
Node* deferred_on_resolve,
Node* deferred_on_reject);
+ void FastPerformPromiseThen(Node* context, Node* promise,
+ Node* on_resolve = nullptr,
+ Node* on_reject = nullptr,
+ Node* result_promise = nullptr);
+
void InternalResolvePromise(Node* context, Node* promise, Node* result);
void BranchIfFastPath(Node* context, Node* promise, Label* if_isunmodified,

Powered by Google App Engine
This is Rietveld 408576698