| 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-gen.h" |    5 #include "src/builtins/builtins-async-gen.h" | 
|    6 #include "src/builtins/builtins-utils-gen.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-factory.h" |    8 #include "src/code-factory.h" | 
|    9 #include "src/code-stub-assembler.h" |    9 #include "src/code-stub-assembler.h" | 
|   10 #include "src/frames-inl.h" |   10 #include "src/frames-inl.h" | 
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  227 #endif |  227 #endif | 
|  228  |  228  | 
|  229   ClearAwaitedPromise(generator); |  229   ClearAwaitedPromise(generator); | 
|  230  |  230  | 
|  231   CSA_SLOW_ASSERT(this, IsGeneratorSuspended(generator)); |  231   CSA_SLOW_ASSERT(this, IsGeneratorSuspended(generator)); | 
|  232  |  232  | 
|  233   CallStub(CodeFactory::ResumeGenerator(isolate()), context, value, generator, |  233   CallStub(CodeFactory::ResumeGenerator(isolate()), context, value, generator, | 
|  234            SmiConstant(resume_mode), |  234            SmiConstant(resume_mode), | 
|  235            SmiConstant(static_cast<int>(SuspendFlags::kAsyncGeneratorAwait))); |  235            SmiConstant(static_cast<int>(SuspendFlags::kAsyncGeneratorAwait))); | 
|  236  |  236  | 
|  237   TailCallStub(CodeFactory::AsyncGeneratorResumeNext(isolate()), context, |  237   TailCallBuiltin(Builtins::kAsyncGeneratorResumeNext, context, generator); | 
|  238                generator); |  | 
|  239 } |  238 } | 
|  240  |  239  | 
|  241 template <typename Descriptor> |  240 template <typename Descriptor> | 
|  242 void AsyncGeneratorBuiltinsAssembler::AsyncGeneratorAwait(bool is_catchable) { |  241 void AsyncGeneratorBuiltinsAssembler::AsyncGeneratorAwait(bool is_catchable) { | 
|  243   Node* generator = Parameter(1); |  242   Node* generator = Parameter(1); | 
|  244   Node* value = Parameter(2); |  243   Node* value = Parameter(2); | 
|  245   Node* context = Parameter(5); |  244   Node* context = Parameter(5); | 
|  246  |  245  | 
|  247   CSA_SLOW_ASSERT(this, |  246   CSA_SLOW_ASSERT(this, | 
|  248                   HasInstanceType(generator, JS_ASYNC_GENERATOR_OBJECT_TYPE)); |  247                   HasInstanceType(generator, JS_ASYNC_GENERATOR_OBJECT_TYPE)); | 
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  502  |  501  | 
|  503   Node* const next = TakeFirstAsyncGeneratorRequestFromQueue(generator); |  502   Node* const next = TakeFirstAsyncGeneratorRequestFromQueue(generator); | 
|  504   Node* const promise = LoadPromiseFromAsyncGeneratorRequest(next); |  503   Node* const promise = LoadPromiseFromAsyncGeneratorRequest(next); | 
|  505  |  504  | 
|  506   Return(CallBuiltin(Builtins::kRejectNativePromise, context, promise, value, |  505   Return(CallBuiltin(Builtins::kRejectNativePromise, context, promise, value, | 
|  507                      TrueConstant())); |  506                      TrueConstant())); | 
|  508 } |  507 } | 
|  509  |  508  | 
|  510 }  // namespace internal |  509 }  // namespace internal | 
|  511 }  // namespace v8 |  510 }  // namespace v8 | 
| OLD | NEW |