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

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

Issue 2630593004: [promises] Remove runtime call from fastpath in PromiseReject (Closed)
Patch Set: remove helper 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
« no previous file with comments | « src/builtins/builtins.h ('k') | src/builtins/builtins-promise.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-promise.h
diff --git a/src/builtins/builtins-promise.h b/src/builtins/builtins-promise.h
index ce896a4f303225170a3288ef5406a9f59c6797d2..187a43e97e5fa6674a13d21876a19ee6223da56f 100644
--- a/src/builtins/builtins-promise.h
+++ b/src/builtins/builtins-promise.h
@@ -34,6 +34,23 @@ class PromiseBuiltinsAssembler : public CodeStubAssembler {
Node* resolve, Node* reject,
Node* context);
+ std::pair<Node*, Node*> CreatePromiseResolvingFunctions(
+ Node* promise, Node* native_context, Node* promise_context);
+
+ Node* PromiseHasHandler(Node* promise);
+
+ Node* CreatePromiseResolvingFunctionsContext(Node* promise, Node* debug_event,
+ Node* native_context);
+
+ Node* CreatePromiseGetCapabilitiesExecutorContext(Node* native_context,
+ Node* promise_capability);
+
+ Node* NewPromiseCapability(Node* context, Node* constructor,
+ Node* debug_event = nullptr);
+
+ protected:
+ void PromiseInit(Node* promise);
+
Node* ThrowIfNotJSReceiver(Node* context, Node* value,
MessageTemplate::Template msg_template,
const char* method_name = nullptr);
@@ -41,8 +58,6 @@ class PromiseBuiltinsAssembler : public CodeStubAssembler {
Node* SpeciesConstructor(Node* context, Node* object,
Node* default_constructor);
- Node* PromiseHasHandler(Node* promise);
-
void PromiseSetHasHandler(Node* promise);
void AppendPromiseCallback(int offset, compiler::Node* promise,
@@ -66,27 +81,17 @@ class PromiseBuiltinsAssembler : public CodeStubAssembler {
Label* if_isunmodified, Label* if_ismodified);
Node* CreatePromiseContext(Node* native_context, int slots);
- Node* CreatePromiseResolvingFunctionsContext(Node* promise, Node* debug_event,
- Node* native_context);
-
- std::pair<Node*, Node*> CreatePromiseResolvingFunctions(
- Node* promise, Node* native_context, Node* promise_context);
-
- Node* CreatePromiseGetCapabilitiesExecutorContext(Node* native_context,
- Node* promise_capability);
-
void PromiseFulfill(Node* context, Node* promise, Node* result,
v8::Promise::PromiseState status);
- Node* NewPromiseCapability(Node* context, Node* constructor,
- Node* debug_event = nullptr);
-
void BranchIfAccessCheckFailed(Node* context, Node* native_context,
Node* promise_constructor, Node* executor,
Label* if_noaccess);
- protected:
- void PromiseInit(Node* promise);
+ void InternalPromiseReject(Node* context, Node* promise, Node* value,
+ bool debug_event);
+ void InternalPromiseReject(Node* context, Node* promise, Node* value,
+ Node* debug_event);
private:
Node* AllocateJSPromise(Node* context);
« no previous file with comments | « src/builtins/builtins.h ('k') | src/builtins/builtins-promise.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698