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

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

Issue 2645313003: [async-iteration] implement Async-from-Sync Iterator (Closed)
Patch Set: [async-iteration] implement Async-from-Sync Iterator Created 3 years, 10 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
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 #ifndef V8_BUILTINS_BUILTINS_ASYNC_H_ 5 #ifndef V8_BUILTINS_BUILTINS_ASYNC_H_
6 #define V8_BUILTINS_BUILTINS_ASYNC_H_ 6 #define V8_BUILTINS_BUILTINS_ASYNC_H_
7 7
8 #include "src/builtins/builtins-promise.h" 8 #include "src/builtins/builtins-promise.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 12
13 class AsyncBuiltinsAssembler : public PromiseBuiltinsAssembler { 13 class AsyncBuiltinsAssembler : public PromiseBuiltinsAssembler {
14 public: 14 public:
15 explicit AsyncBuiltinsAssembler(CodeAssemblerState* state) 15 explicit AsyncBuiltinsAssembler(CodeAssemblerState* state)
16 : PromiseBuiltinsAssembler(state) {} 16 : PromiseBuiltinsAssembler(state) {}
17 17
18 // Async Iterator
neis 2017/02/20 09:41:20 I think you can drop this comment.
caitp 2017/02/20 17:09:34 Done. I actually removed all changes to builtins-a
19 Node* AllocateAsyncIteratorValueUnwrapContext(Node* native_context,
20 Node* done);
21
18 protected: 22 protected:
19 typedef std::function<Node*(Node*)> NodeGenerator1; 23 typedef std::function<Node*(Node*)> NodeGenerator1;
20 24
21 // Perform steps to resume generator after `value` is resolved. 25 // Perform steps to resume generator after `value` is resolved.
22 // `on_reject_context_index` is an index into the Native Context, which should 26 // `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 27 // 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 28 // value following the reject index should be a similar value for the resolve
25 // closure. Returns the Promise-wrapped `value`. 29 // closure. Returns the Promise-wrapped `value`.
26 Node* Await(Node* context, Node* generator, Node* value, Node* outer_promise, 30 Node* Await(Node* context, Node* generator, Node* value, Node* outer_promise,
27 const NodeGenerator1& create_closure_context, 31 const NodeGenerator1& create_closure_context,
28 int on_resolve_context_index, int on_reject_context_index, 32 int on_resolve_context_index, int on_reject_context_index,
29 bool is_predicted_as_caught); 33 bool is_predicted_as_caught);
30 }; 34 };
31 35
32 } // namespace internal 36 } // namespace internal
33 } // namespace v8 37 } // namespace v8
34 38
35 #endif // V8_BUILTINS_BUILTINS_ASYNC_H_ 39 #endif // V8_BUILTINS_BUILTINS_ASYNC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698