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

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

Issue 2635353002: [builtins] introduce AsyncBuiltinsAssembler for ES2016 features and beyond (Closed)
Patch Set: add some comments to make it easier to read the code 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef V8_BUILTINS_BUILTINS_ASYNC_H_
6 #define V8_BUILTINS_BUILTINS_ASYNC_H_
7
8 #include "src/builtins/builtins-promise.h"
9
10 namespace v8 {
11 namespace internal {
12
13 class AsyncBuiltinsAssembler : public PromiseBuiltinsAssembler {
14 public:
15 explicit AsyncBuiltinsAssembler(CodeAssemblerState* state)
16 : PromiseBuiltinsAssembler(state) {}
17
18 protected:
19 typedef std::function<Node*(Node*)> NodeGenerator1;
20
21 // Perform steps to resume generator after `value` is resolved.
22 // `on_reject_context_index` is an index into the Native Context, which should
23 // point to a SharedFunctioninfo instance used to create the closure. The
24 // value following the reject index should be a similar value for the resolve
25 // closure. Returns the Promise-wrapped `value`.
26 Node* Await(Node* context, Node* generator, Node* value, Node* outer_promise,
27 const NodeGenerator1& create_closure_context,
28 int on_resolve_context_index, int on_reject_context_index,
29 bool is_catchable);
30 };
31
32 } // namespace internal
33 } // namespace v8
34
35 #endif // V8_BUILTINS_BUILTINS_ASYNC_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/builtins/builtins-async.cc » ('j') | src/builtins/builtins-async.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698