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

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

Issue 2604273003: [csa] Refactor promises API (Closed)
Patch Set: remove CSA::Promises API 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 Node* AllocateAndInitJSPromise(Node* context);
adamk 2017/01/03 23:26:10 Please add some comments explaining the difference
gsathya 2017/01/04 01:22:37 Done.
20 Node* AllocateAndInitJSPromise(Node* context, Node* parent);
21 Node* AllocateAndSetJSPromise(Node* context, Node* status, Node* result);
20 22
21 Node* ThrowIfNotJSReceiver(Node* context, Node* value, 23 Node* ThrowIfNotJSReceiver(Node* context, Node* value,
22 MessageTemplate::Template msg_template); 24 MessageTemplate::Template msg_template);
23 25
24 Node* SpeciesConstructor(Node* context, Node* object, 26 Node* SpeciesConstructor(Node* context, Node* object,
25 Node* default_constructor); 27 Node* default_constructor);
26 28
27 Node* PromiseHasHandler(Node* promise); 29 Node* PromiseHasHandler(Node* promise);
28 30
29 void PromiseSetHasHandler(Node* promise); 31 void PromiseSetHasHandler(Node* promise);
(...skipping 20 matching lines...) Expand all
50 Node* native_context); 52 Node* native_context);
51 53
52 std::pair<Node*, Node*> CreatePromiseResolvingFunctions( 54 std::pair<Node*, Node*> CreatePromiseResolvingFunctions(
53 Node* promise, Node* native_context, Node* promise_context); 55 Node* promise, Node* native_context, Node* promise_context);
54 56
55 Node* CreatePromiseGetCapabilitiesExecutorContext(Node* native_context, 57 Node* CreatePromiseGetCapabilitiesExecutorContext(Node* native_context,
56 Node* promise_capability); 58 Node* promise_capability);
57 59
58 Node* NewPromiseCapability(Node* context, Node* constructor, 60 Node* NewPromiseCapability(Node* context, Node* constructor,
59 Node* debug_event = nullptr); 61 Node* debug_event = nullptr);
62
63 protected:
adamk 2017/01/03 23:26:10 Can these be private?
gsathya 2017/01/04 01:22:37 Moved allocatejspromise to be private. PromiseInit
64 Node* AllocateJSPromise(Node* context);
65 void PromiseInit(Node* promise);
60 }; 66 };
61 67
62 } // namespace internal 68 } // namespace internal
63 } // namespace v8 69 } // 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