#include "src/builtins/builtins-async-gen.h"
#include "src/builtins/builtins-utils-gen.h"
#include "src/builtins/builtins.h"
#include "src/codegen/code-stub-assembler-inl.h"
#include "src/execution/frames-inl.h"
#include "src/objects/js-generator.h"
#include "src/objects/js-promise.h"
namespace v8 {
namespace internal {
#include "src/codegen/define-code-stub-assembler-macros.inc"
namespace {
class AsyncGeneratorBuiltinsAssembler : public AsyncBuiltinsAssembler { … };
void AsyncGeneratorBuiltinsAssembler::AsyncGeneratorEnqueue(
CodeStubArguments* args, TNode<Context> context, TNode<Object> receiver,
TNode<Object> value, JSAsyncGeneratorObject::ResumeMode resume_mode,
const char* method_name) { … }
TNode<AsyncGeneratorRequest>
AsyncGeneratorBuiltinsAssembler::AllocateAsyncGeneratorRequest(
JSAsyncGeneratorObject::ResumeMode resume_mode, TNode<Object> resume_value,
TNode<JSPromise> promise) { … }
void AsyncGeneratorBuiltinsAssembler::AsyncGeneratorAwaitResume(
TNode<Context> context,
TNode<JSAsyncGeneratorObject> async_generator_object, TNode<Object> value,
JSAsyncGeneratorObject::ResumeMode resume_mode) { … }
void AsyncGeneratorBuiltinsAssembler::AsyncGeneratorAwaitResumeClosure(
TNode<Context> context, TNode<Object> value,
JSAsyncGeneratorObject::ResumeMode resume_mode) { … }
template <typename Descriptor>
void AsyncGeneratorBuiltinsAssembler::AsyncGeneratorAwait() { … }
void AsyncGeneratorBuiltinsAssembler::AddAsyncGeneratorRequestToQueue(
TNode<JSAsyncGeneratorObject> generator,
TNode<AsyncGeneratorRequest> request) { … }
TNode<AsyncGeneratorRequest>
AsyncGeneratorBuiltinsAssembler::TakeFirstAsyncGeneratorRequestFromQueue(
TNode<JSAsyncGeneratorObject> generator) { … }
void AsyncGeneratorBuiltinsAssembler::AsyncGeneratorReturnClosedReject(
TNode<Context> context, TNode<JSAsyncGeneratorObject> generator,
TNode<Object> value) { … }
}
TF_BUILTIN(AsyncGeneratorPrototypeNext, AsyncGeneratorBuiltinsAssembler) { … }
TF_BUILTIN(AsyncGeneratorPrototypeReturn, AsyncGeneratorBuiltinsAssembler) { … }
TF_BUILTIN(AsyncGeneratorPrototypeThrow, AsyncGeneratorBuiltinsAssembler) { … }
TF_BUILTIN(AsyncGeneratorAwaitResolveClosure, AsyncGeneratorBuiltinsAssembler) { … }
TF_BUILTIN(AsyncGeneratorAwaitRejectClosure, AsyncGeneratorBuiltinsAssembler) { … }
TF_BUILTIN(AsyncGeneratorAwait, AsyncGeneratorBuiltinsAssembler) { … }
TF_BUILTIN(AsyncGeneratorResumeNext, AsyncGeneratorBuiltinsAssembler) { … }
TF_BUILTIN(AsyncGeneratorResolve, AsyncGeneratorBuiltinsAssembler) { … }
TF_BUILTIN(AsyncGeneratorReject, AsyncGeneratorBuiltinsAssembler) { … }
TF_BUILTIN(AsyncGeneratorYieldWithAwait, AsyncGeneratorBuiltinsAssembler) { … }
TF_BUILTIN(AsyncGeneratorYieldWithAwaitResolveClosure,
AsyncGeneratorBuiltinsAssembler) { … }
TF_BUILTIN(AsyncGeneratorReturn, AsyncGeneratorBuiltinsAssembler) { … }
TF_BUILTIN(AsyncGeneratorReturnResolveClosure,
AsyncGeneratorBuiltinsAssembler) { … }
TF_BUILTIN(AsyncGeneratorReturnClosedResolveClosure,
AsyncGeneratorBuiltinsAssembler) { … }
TF_BUILTIN(AsyncGeneratorReturnClosedRejectClosure,
AsyncGeneratorBuiltinsAssembler) { … }
#include "src/codegen/undef-code-stub-assembler-macros.inc"
}
}