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

Side by Side Diff: src/builtins/builtins-promise.h

Issue 2604273003: [csa] Refactor promises API (Closed)
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/builtins/builtins-promise.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-stub-assembler.h" 5 #include "src/code-stub-assembler.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 9
10 typedef compiler::Node Node; 10 typedef compiler::Node Node;
11 typedef CodeStubAssembler::ParameterMode ParameterMode; 11 typedef CodeStubAssembler::ParameterMode ParameterMode;
12 typedef compiler::CodeAssemblerState CodeAssemblerState; 12 typedef compiler::CodeAssemblerState CodeAssemblerState;
13 13
14 class PromiseBuiltinsAssembler : public CodeStubAssembler { 14 class PromiseBuiltinsAssembler : public CodeStubAssembler {
15 public: 15 public:
16 explicit PromiseBuiltinsAssembler(CodeAssemblerState* state) 16 explicit PromiseBuiltinsAssembler(CodeAssemblerState* state)
17 : CodeStubAssembler(state) {} 17 : CodeStubAssembler(state) {}
18 18
19 Node* AllocateAndInitPromise(Node* context, Node* parent); 19 // These are just wrapper functions over the CSA counterparts and
20 // call out to the init promise hook.
adamk 2017/01/03 18:23:06 This is really a question for caitp, I think, but
caitp 2017/01/03 18:32:05 I'm not sure if there are any situations where we'
21 Node* AllocateAndInitJSPromise(Node* context, Node* parent);
22 Node* AllocateAndSetJSPromise(Node* context, Node* status, Node* result,
23 Node* parent);
20 24
21 Node* ThrowIfNotJSReceiver(Node* context, Node* value, 25 Node* ThrowIfNotJSReceiver(Node* context, Node* value,
22 MessageTemplate::Template msg_template); 26 MessageTemplate::Template msg_template);
23 27
24 Node* SpeciesConstructor(Node* context, Node* object, 28 Node* SpeciesConstructor(Node* context, Node* object,
25 Node* default_constructor); 29 Node* default_constructor);
26 30
27 Node* PromiseHasHandler(Node* promise); 31 Node* PromiseHasHandler(Node* promise);
28 32
29 void PromiseSetHasHandler(Node* promise); 33 void PromiseSetHasHandler(Node* promise);
(...skipping 17 matching lines...) Expand all
47 51
48 Node* CreatePromiseResolvingFunctionsContext(Node* promise, Node* debug_event, 52 Node* CreatePromiseResolvingFunctionsContext(Node* promise, Node* debug_event,
49 Node* native_context); 53 Node* native_context);
50 54
51 std::pair<Node*, Node*> CreatePromiseResolvingFunctions( 55 std::pair<Node*, Node*> CreatePromiseResolvingFunctions(
52 Node* promise, Node* native_context, Node* promise_context); 56 Node* promise, Node* native_context, Node* promise_context);
53 }; 57 };
54 58
55 } // namespace internal 59 } // namespace internal
56 } // namespace v8 60 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins-promise.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698