OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 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/builtins/builtins-async.h" | 5 #include "src/builtins/builtins-async.h" |
6 #include "src/builtins/builtins-utils.h" | 6 #include "src/builtins/builtins-utils-gen.h" |
7 #include "src/builtins/builtins.h" | 7 #include "src/builtins/builtins.h" |
8 #include "src/code-stub-assembler.h" | 8 #include "src/code-stub-assembler.h" |
9 #include "src/objects-inl.h" | 9 #include "src/objects-inl.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 | 13 |
14 typedef compiler::Node Node; | |
15 typedef CodeStubAssembler::ParameterMode ParameterMode; | |
16 typedef compiler::CodeAssemblerState CodeAssemblerState; | |
17 | |
18 class AsyncFunctionBuiltinsAssembler : public AsyncBuiltinsAssembler { | 14 class AsyncFunctionBuiltinsAssembler : public AsyncBuiltinsAssembler { |
19 public: | 15 public: |
20 explicit AsyncFunctionBuiltinsAssembler(CodeAssemblerState* state) | 16 explicit AsyncFunctionBuiltinsAssembler(compiler::CodeAssemblerState* state) |
21 : AsyncBuiltinsAssembler(state) {} | 17 : AsyncBuiltinsAssembler(state) {} |
22 | 18 |
23 protected: | 19 protected: |
24 void AsyncFunctionAwait(Node* const context, Node* const generator, | 20 void AsyncFunctionAwait(Node* const context, Node* const generator, |
25 Node* const awaited, Node* const outer_promise, | 21 Node* const awaited, Node* const outer_promise, |
26 const bool is_predicted_as_caught); | 22 const bool is_predicted_as_caught); |
27 | 23 |
28 void AsyncFunctionAwaitResumeClosure( | 24 void AsyncFunctionAwaitResumeClosure( |
29 Node* const context, Node* const sent_value, | 25 Node* const context, Node* const sent_value, |
30 JSGeneratorObject::ResumeMode resume_mode); | 26 JSGeneratorObject::ResumeMode resume_mode); |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 { | 195 { |
200 // Pop the Promise under construction in an async function on | 196 // Pop the Promise under construction in an async function on |
201 // from catch prediction stack. | 197 // from catch prediction stack. |
202 CallRuntime(Runtime::kDebugPopPromise, context); | 198 CallRuntime(Runtime::kDebugPopPromise, context); |
203 Return(promise); | 199 Return(promise); |
204 } | 200 } |
205 } | 201 } |
206 | 202 |
207 } // namespace internal | 203 } // namespace internal |
208 } // namespace v8 | 204 } // namespace v8 |
OLD | NEW |