#include <optional>
#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"
namespace v8 {
namespace internal {
#include "src/codegen/define-code-stub-assembler-macros.inc"
namespace {
class AsyncFromSyncBuiltinsAssembler : public AsyncBuiltinsAssembler { … };
void AsyncFromSyncBuiltinsAssembler::Generate_AsyncFromSyncIteratorMethod(
CodeStubArguments* args, const TNode<Context> context,
const TNode<Object> iterator, const TNode<Object> sent_value,
const SyncIteratorNodeGenerator& get_method,
const UndefinedMethodHandler& if_method_undefined,
const char* operation_name, CloseOnRejectionOption close_on_rejection,
Label::Type reject_label_type,
std::optional<TNode<Object>> initial_exception_value) { … }
std::pair<TNode<Object>, TNode<Boolean>>
AsyncFromSyncBuiltinsAssembler::LoadIteratorResult(
const TNode<Context> context, const TNode<NativeContext> native_context,
const TNode<Object> iter_result, Label* if_exception,
TVariable<Object>* var_exception) { … }
TNode<JSFunction> AsyncFromSyncBuiltinsAssembler::
CreateAsyncFromSyncIteratorCloseSyncAndRethrowClosure(
TNode<NativeContext> native_context, TNode<JSReceiver> sync_iterator) { … }
TNode<Context> AsyncFromSyncBuiltinsAssembler::
AllocateAsyncFromSyncIteratorCloseSyncAndRethrowContext(
TNode<NativeContext> native_context, TNode<JSReceiver> sync_iterator) { … }
}
TF_BUILTIN(AsyncFromSyncIteratorPrototypeNext, AsyncFromSyncBuiltinsAssembler) { … }
TF_BUILTIN(AsyncFromSyncIteratorPrototypeReturn,
AsyncFromSyncBuiltinsAssembler) { … }
TF_BUILTIN(AsyncFromSyncIteratorPrototypeThrow,
AsyncFromSyncBuiltinsAssembler) { … }
TF_BUILTIN(AsyncFromSyncIteratorCloseSyncAndRethrow,
AsyncFromSyncBuiltinsAssembler) { … }
#include "src/codegen/undef-code-stub-assembler-macros.inc"
}
}