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

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

Issue 2590563003: [promises] Remove deferred object (Closed)
Patch Set: Remove comment Created 4 years 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
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);
20
19 Node* ThrowIfNotJSReceiver(Node* context, Node* value, 21 Node* ThrowIfNotJSReceiver(Node* context, Node* value,
20 MessageTemplate::Template msg_template); 22 MessageTemplate::Template msg_template);
21 23
22 Node* SpeciesConstructor(Node* context, Node* object, 24 Node* SpeciesConstructor(Node* context, Node* object,
23 Node* default_constructor); 25 Node* default_constructor);
24 26
25 Node* PromiseHasHandler(Node* promise); 27 Node* PromiseHasHandler(Node* promise);
26 28
27 void PromiseSetHasHandler(Node* promise); 29 void PromiseSetHasHandler(Node* promise);
28 30
29 void AppendPromiseCallback(int offset, compiler::Node* promise, 31 void AppendPromiseCallback(int offset, compiler::Node* promise,
30 compiler::Node* value); 32 compiler::Node* value);
31 33
32 Node* InternalPerformPromiseThen(Node* context, Node* promise, 34 Node* InternalPerformPromiseThen(Node* context, Node* promise,
33 Node* on_resolve, Node* on_reject, 35 Node* on_resolve, Node* on_reject,
34 Node* deferred); 36 Node* deferred_promise,
37 Node* deferred_on_resolve,
38 Node* deferred_on_reject);
35 39
36 void InternalResolvePromise(Node* context, Node* promise, Node* result, 40 void InternalResolvePromise(Node* context, Node* promise, Node* result,
37 Label* out); 41 Label* out);
38 42
39 void BranchIfFastPath(Node* context, Node* promise, Label* if_isunmodified, 43 void BranchIfFastPath(Node* context, Node* promise, Label* if_isunmodified,
40 Label* if_ismodified); 44 Label* if_ismodified);
41 45
42 Node* CreatePromiseResolvingFunctionsContext(Node* promise, Node* debug_event, 46 Node* CreatePromiseResolvingFunctionsContext(Node* promise, Node* debug_event,
43 Node* native_context); 47 Node* native_context);
44 48
45 std::pair<Node*, Node*> CreatePromiseResolvingFunctions( 49 std::pair<Node*, Node*> CreatePromiseResolvingFunctions(
46 Node* promise, Node* native_context, Node* promise_context); 50 Node* promise, Node* native_context, Node* promise_context);
47 }; 51 };
48 52
49 } // namespace internal 53 } // namespace internal
50 } // namespace v8 54 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698