Commit d97bb317 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[async-await] Turn await closures into intrinsics.

There's no need to have the AsyncFunctionAwait/AsyncGeneratorAwait
operations as separate closures that are called via JavaScript calling
convention, but instead we can just have them as intrinsics (with the
goal to eventually turn them into IC stubs).

Drive-by-fix: Tail call to the ResumeGenerator builtin when resuming
an async function. The earlier restrictions no only apply with the new
machinery.

Bug: v8:7253
Change-Id: I0c4d04dae15b4211158fc07151adafda69d4faec
Reviewed-on: https://chromium-review.googlesource.com/924703Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51382}
parent 99fcd7bb
......@@ -1605,18 +1605,6 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
native_context()->set_async_iterator_value_unwrap_shared_fun(*info);
}
{ // --- A s y n c G e n e r a t o r ---
Handle<JSFunction> await_caught =
SimpleCreateFunction(isolate, factory->empty_string(),
Builtins::kAsyncGeneratorAwaitCaught, 1, false);
native_context()->set_async_generator_await_caught(*await_caught);
Handle<JSFunction> await_uncaught =
SimpleCreateFunction(isolate, factory->empty_string(),
Builtins::kAsyncGeneratorAwaitUncaught, 1, false);
native_context()->set_async_generator_await_uncaught(*await_uncaught);
}
{ // --- A r r a y ---
Handle<JSFunction> array_function = InstallFunction(
global, "Array", JS_ARRAY_TYPE, JSArray::kSize, 0,
......@@ -4124,20 +4112,6 @@ void Bootstrapper::ExportFromRuntime(Isolate* isolate,
JSFunction::SetPrototype(async_function_constructor,
async_function_prototype);
{
Handle<JSFunction> function =
SimpleCreateFunction(isolate, factory->empty_string(),
Builtins::kAsyncFunctionAwaitCaught, 2, false);
native_context->set_async_function_await_caught(*function);
}
{
Handle<JSFunction> function =
SimpleCreateFunction(isolate, factory->empty_string(),
Builtins::kAsyncFunctionAwaitUncaught, 2, false);
native_context->set_async_function_await_uncaught(*function);
}
{
Handle<JSFunction> function =
SimpleCreateFunction(isolate, factory->empty_string(),
......
......@@ -47,12 +47,7 @@ void AsyncFunctionBuiltinsAssembler::AsyncFunctionAwaitResume(
// Resume the {receiver} using our trampoline.
Callable callable = CodeFactory::ResumeGenerator(isolate());
CallStub(callable, context, argument, generator);
// The resulting Promise is a throwaway, so it doesn't matter what it
// resolves to. What is important is that we don't end up keeping the
// whole chain of intermediate Promises alive by returning the return value
// of ResumeGenerator, as that would create a memory leak.
TailCallStub(callable, context, argument, generator);
}
TF_BUILTIN(AsyncFunctionAwaitFulfill, AsyncFunctionBuiltinsAssembler) {
......@@ -61,7 +56,6 @@ TF_BUILTIN(AsyncFunctionAwaitFulfill, AsyncFunctionBuiltinsAssembler) {
Node* const context = Parameter(Descriptor::kContext);
AsyncFunctionAwaitResume(context, argument, generator,
JSGeneratorObject::kNext);
Return(UndefinedConstant());
}
TF_BUILTIN(AsyncFunctionAwaitReject, AsyncFunctionBuiltinsAssembler) {
......@@ -70,7 +64,6 @@ TF_BUILTIN(AsyncFunctionAwaitReject, AsyncFunctionBuiltinsAssembler) {
Node* const context = Parameter(Descriptor::kContext);
AsyncFunctionAwaitResume(context, argument, generator,
JSGeneratorObject::kThrow);
Return(UndefinedConstant());
}
// ES#abstract-ops-async-function-await
......@@ -100,30 +93,28 @@ void AsyncFunctionBuiltinsAssembler::AsyncFunctionAwait(
// Called by the parser from the desugaring of 'await' when catch
// prediction indicates that there is a locally surrounding catch block.
TF_BUILTIN(AsyncFunctionAwaitCaught, AsyncFunctionBuiltinsAssembler) {
CSA_ASSERT_JS_ARGC_EQ(this, 3);
Node* const generator = Parameter(Descriptor::kGenerator);
Node* const awaited = Parameter(Descriptor::kAwaited);
Node* const value = Parameter(Descriptor::kValue);
Node* const outer_promise = Parameter(Descriptor::kOuterPromise);
Node* const context = Parameter(Descriptor::kContext);
static const bool kIsPredictedAsCaught = true;
AsyncFunctionAwait(context, generator, awaited, outer_promise,
AsyncFunctionAwait(context, generator, value, outer_promise,
kIsPredictedAsCaught);
}
// Called by the parser from the desugaring of 'await' when catch
// prediction indicates no locally surrounding catch block.
TF_BUILTIN(AsyncFunctionAwaitUncaught, AsyncFunctionBuiltinsAssembler) {
CSA_ASSERT_JS_ARGC_EQ(this, 3);
Node* const generator = Parameter(Descriptor::kGenerator);
Node* const awaited = Parameter(Descriptor::kAwaited);
Node* const value = Parameter(Descriptor::kValue);
Node* const outer_promise = Parameter(Descriptor::kOuterPromise);
Node* const context = Parameter(Descriptor::kContext);
static const bool kIsPredictedAsCaught = false;
AsyncFunctionAwait(context, generator, awaited, outer_promise,
AsyncFunctionAwait(context, generator, value, outer_promise,
kIsPredictedAsCaught);
}
......
......@@ -241,9 +241,9 @@ void AsyncGeneratorBuiltinsAssembler::AsyncGeneratorAwaitResume(
template <typename Descriptor>
void AsyncGeneratorBuiltinsAssembler::AsyncGeneratorAwait(bool is_catchable) {
Node* generator = Parameter(Descriptor::kGenerator);
Node* value = Parameter(Descriptor::kAwaited);
Node* context = Parameter(Descriptor::kContext);
Node* const generator = Parameter(Descriptor::kGenerator);
Node* const value = Parameter(Descriptor::kValue);
Node* const context = Parameter(Descriptor::kContext);
CSA_SLOW_ASSERT(this, TaggedIsAsyncGenerator(generator));
......
......@@ -367,8 +367,8 @@ namespace internal {
/* AsyncFunction */ \
TFC(AsyncFunctionAwaitFulfill, PromiseReactionHandler, 1) \
TFC(AsyncFunctionAwaitReject, PromiseReactionHandler, 1) \
TFJ(AsyncFunctionAwaitCaught, 3, kGenerator, kAwaited, kOuterPromise) \
TFJ(AsyncFunctionAwaitUncaught, 3, kGenerator, kAwaited, kOuterPromise) \
TFS(AsyncFunctionAwaitCaught, kGenerator, kValue, kOuterPromise) \
TFS(AsyncFunctionAwaitUncaught, kGenerator, kValue, kOuterPromise) \
TFJ(AsyncFunctionPromiseCreate, 0) \
TFJ(AsyncFunctionPromiseRelease, 1, kPromise) \
\
......@@ -1178,8 +1178,8 @@ namespace internal {
\
/* Await (proposal-async-iteration/#await), with resume behaviour */ \
/* specific to Async Generators. Internal / Not exposed to JS code. */ \
TFJ(AsyncGeneratorAwaitCaught, 2, kGenerator, kAwaited) \
TFJ(AsyncGeneratorAwaitUncaught, 2, kGenerator, kAwaited) \
TFS(AsyncGeneratorAwaitCaught, kGenerator, kValue) \
TFS(AsyncGeneratorAwaitUncaught, kGenerator, kValue) \
TFC(AsyncGeneratorAwaitFulfill, PromiseReactionHandler, 1) \
TFC(AsyncGeneratorAwaitReject, PromiseReactionHandler, 1) \
TFC(AsyncGeneratorYieldFulfill, PromiseReactionHandler, 1) \
......@@ -1257,11 +1257,7 @@ namespace internal {
V(AsyncFromSyncIteratorPrototypeNext) \
V(AsyncFromSyncIteratorPrototypeReturn) \
V(AsyncFromSyncIteratorPrototypeThrow) \
V(AsyncFunctionAwaitCaught) \
V(AsyncFunctionAwaitUncaught) \
V(AsyncGeneratorResolve) \
V(AsyncGeneratorAwaitCaught) \
V(AsyncGeneratorAwaitUncaught) \
V(PromiseAll) \
V(PromiseConstructor) \
V(PromiseFulfillReactionJob) \
......
......@@ -41,6 +41,14 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceCreateJSGeneratorObject(node);
case Runtime::kInlineGeneratorGetInputOrDebugPos:
return ReduceGeneratorGetInputOrDebugPos(node);
case Runtime::kInlineAsyncFunctionAwaitCaught:
return ReduceAsyncFunctionAwaitCaught(node);
case Runtime::kInlineAsyncFunctionAwaitUncaught:
return ReduceAsyncFunctionAwaitUncaught(node);
case Runtime::kInlineAsyncGeneratorAwaitCaught:
return ReduceAsyncGeneratorAwaitCaught(node);
case Runtime::kInlineAsyncGeneratorAwaitUncaught:
return ReduceAsyncGeneratorAwaitUncaught(node);
case Runtime::kInlineAsyncGeneratorReject:
return ReduceAsyncGeneratorReject(node);
case Runtime::kInlineAsyncGeneratorResolve:
......@@ -177,6 +185,33 @@ Reduction JSIntrinsicLowering::ReduceGeneratorGetInputOrDebugPos(Node* node) {
return Change(node, op, generator, effect, control);
}
Reduction JSIntrinsicLowering::ReduceAsyncFunctionAwaitCaught(Node* node) {
return Change(
node,
Builtins::CallableFor(isolate(), Builtins::kAsyncFunctionAwaitCaught), 0);
}
Reduction JSIntrinsicLowering::ReduceAsyncFunctionAwaitUncaught(Node* node) {
return Change(
node,
Builtins::CallableFor(isolate(), Builtins::kAsyncFunctionAwaitUncaught),
0);
}
Reduction JSIntrinsicLowering::ReduceAsyncGeneratorAwaitCaught(Node* node) {
return Change(
node,
Builtins::CallableFor(isolate(), Builtins::kAsyncGeneratorAwaitCaught),
0);
}
Reduction JSIntrinsicLowering::ReduceAsyncGeneratorAwaitUncaught(Node* node) {
return Change(
node,
Builtins::CallableFor(isolate(), Builtins::kAsyncGeneratorAwaitUncaught),
0);
}
Reduction JSIntrinsicLowering::ReduceAsyncGeneratorReject(Node* node) {
return Change(
node, Builtins::CallableFor(isolate(), Builtins::kAsyncGeneratorReject),
......
......@@ -45,6 +45,10 @@ class V8_EXPORT_PRIVATE JSIntrinsicLowering final
Reduction ReduceCreateJSGeneratorObject(Node* node);
Reduction ReduceGeneratorClose(Node* node);
Reduction ReduceGeneratorGetInputOrDebugPos(Node* node);
Reduction ReduceAsyncFunctionAwaitCaught(Node* node);
Reduction ReduceAsyncFunctionAwaitUncaught(Node* node);
Reduction ReduceAsyncGeneratorAwaitCaught(Node* node);
Reduction ReduceAsyncGeneratorAwaitUncaught(Node* node);
Reduction ReduceAsyncGeneratorReject(Node* node);
Reduction ReduceAsyncGeneratorResolve(Node* node);
Reduction ReduceAsyncGeneratorYield(Node* node);
......
......@@ -32,46 +32,40 @@ enum ContextLookupFlags {
// must always be allocated via Heap::AllocateContext() or
// Factory::NewContext.
#define NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \
V(ASYNC_FUNCTION_AWAIT_CAUGHT_INDEX, JSFunction, \
async_function_await_caught) \
V(ASYNC_FUNCTION_AWAIT_UNCAUGHT_INDEX, JSFunction, \
async_function_await_uncaught) \
V(ASYNC_FUNCTION_PROMISE_CREATE_INDEX, JSFunction, \
async_function_promise_create) \
V(ASYNC_FUNCTION_PROMISE_RELEASE_INDEX, JSFunction, \
async_function_promise_release) \
V(IS_ARRAYLIKE, JSFunction, is_arraylike) \
V(GENERATOR_NEXT_INTERNAL, JSFunction, generator_next_internal) \
V(MAKE_ERROR_INDEX, JSFunction, make_error) \
V(MAKE_RANGE_ERROR_INDEX, JSFunction, make_range_error) \
V(MAKE_SYNTAX_ERROR_INDEX, JSFunction, make_syntax_error) \
V(MAKE_TYPE_ERROR_INDEX, JSFunction, make_type_error) \
V(MAKE_URI_ERROR_INDEX, JSFunction, make_uri_error) \
V(OBJECT_CREATE, JSFunction, object_create) \
V(OBJECT_DEFINE_PROPERTIES, JSFunction, object_define_properties) \
V(OBJECT_DEFINE_PROPERTY, JSFunction, object_define_property) \
V(OBJECT_GET_PROTOTYPE_OF, JSFunction, object_get_prototype_of) \
V(OBJECT_IS_EXTENSIBLE, JSFunction, object_is_extensible) \
V(OBJECT_IS_FROZEN, JSFunction, object_is_frozen) \
V(OBJECT_IS_SEALED, JSFunction, object_is_sealed) \
V(OBJECT_KEYS, JSFunction, object_keys) \
V(REGEXP_INTERNAL_MATCH, JSFunction, regexp_internal_match) \
V(REFLECT_APPLY_INDEX, JSFunction, reflect_apply) \
V(REFLECT_CONSTRUCT_INDEX, JSFunction, reflect_construct) \
V(REFLECT_DEFINE_PROPERTY_INDEX, JSFunction, reflect_define_property) \
V(REFLECT_DELETE_PROPERTY_INDEX, JSFunction, reflect_delete_property) \
V(SPREAD_ARGUMENTS_INDEX, JSFunction, spread_arguments) \
V(SPREAD_ITERABLE_INDEX, JSFunction, spread_iterable) \
V(MATH_FLOOR_INDEX, JSFunction, math_floor) \
V(MATH_POW_INDEX, JSFunction, math_pow) \
V(NEW_PROMISE_CAPABILITY_INDEX, JSFunction, new_promise_capability) \
V(PROMISE_INTERNAL_CONSTRUCTOR_INDEX, JSFunction, \
promise_internal_constructor) \
V(IS_PROMISE_INDEX, JSFunction, is_promise) \
V(PROMISE_THEN_INDEX, JSFunction, promise_then) \
V(ASYNC_GENERATOR_AWAIT_CAUGHT, JSFunction, async_generator_await_caught) \
V(ASYNC_GENERATOR_AWAIT_UNCAUGHT, JSFunction, async_generator_await_uncaught)
#define NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \
V(ASYNC_FUNCTION_PROMISE_CREATE_INDEX, JSFunction, \
async_function_promise_create) \
V(ASYNC_FUNCTION_PROMISE_RELEASE_INDEX, JSFunction, \
async_function_promise_release) \
V(IS_ARRAYLIKE, JSFunction, is_arraylike) \
V(GENERATOR_NEXT_INTERNAL, JSFunction, generator_next_internal) \
V(MAKE_ERROR_INDEX, JSFunction, make_error) \
V(MAKE_RANGE_ERROR_INDEX, JSFunction, make_range_error) \
V(MAKE_SYNTAX_ERROR_INDEX, JSFunction, make_syntax_error) \
V(MAKE_TYPE_ERROR_INDEX, JSFunction, make_type_error) \
V(MAKE_URI_ERROR_INDEX, JSFunction, make_uri_error) \
V(OBJECT_CREATE, JSFunction, object_create) \
V(OBJECT_DEFINE_PROPERTIES, JSFunction, object_define_properties) \
V(OBJECT_DEFINE_PROPERTY, JSFunction, object_define_property) \
V(OBJECT_GET_PROTOTYPE_OF, JSFunction, object_get_prototype_of) \
V(OBJECT_IS_EXTENSIBLE, JSFunction, object_is_extensible) \
V(OBJECT_IS_FROZEN, JSFunction, object_is_frozen) \
V(OBJECT_IS_SEALED, JSFunction, object_is_sealed) \
V(OBJECT_KEYS, JSFunction, object_keys) \
V(REGEXP_INTERNAL_MATCH, JSFunction, regexp_internal_match) \
V(REFLECT_APPLY_INDEX, JSFunction, reflect_apply) \
V(REFLECT_CONSTRUCT_INDEX, JSFunction, reflect_construct) \
V(REFLECT_DEFINE_PROPERTY_INDEX, JSFunction, reflect_define_property) \
V(REFLECT_DELETE_PROPERTY_INDEX, JSFunction, reflect_delete_property) \
V(SPREAD_ARGUMENTS_INDEX, JSFunction, spread_arguments) \
V(SPREAD_ITERABLE_INDEX, JSFunction, spread_iterable) \
V(MATH_FLOOR_INDEX, JSFunction, math_floor) \
V(MATH_POW_INDEX, JSFunction, math_pow) \
V(NEW_PROMISE_CAPABILITY_INDEX, JSFunction, new_promise_capability) \
V(PROMISE_INTERNAL_CONSTRUCTOR_INDEX, JSFunction, \
promise_internal_constructor) \
V(IS_PROMISE_INDEX, JSFunction, is_promise) \
V(PROMISE_THEN_INDEX, JSFunction, promise_then)
#define NATIVE_CONTEXT_IMPORTED_FIELDS(V) \
V(ARRAY_CONCAT_INDEX, JSFunction, array_concat) \
......
......@@ -3192,22 +3192,20 @@ void BytecodeGenerator::BuildAwait(Expression* await_expr) {
// Await(operand) and suspend.
RegisterAllocationScope register_scope(this);
int await_builtin_context_index;
Runtime::FunctionId id;
RegisterList args;
if (IsAsyncGeneratorFunction(function_kind())) {
await_builtin_context_index =
catch_prediction() == HandlerTable::ASYNC_AWAIT
? Context::ASYNC_GENERATOR_AWAIT_UNCAUGHT
: Context::ASYNC_GENERATOR_AWAIT_CAUGHT;
id = catch_prediction() == HandlerTable::ASYNC_AWAIT
? Runtime::kInlineAsyncGeneratorAwaitUncaught
: Runtime::kInlineAsyncGeneratorAwaitCaught;
args = register_allocator()->NewRegisterList(2);
builder()
->MoveRegister(generator_object(), args[0])
.StoreAccumulatorInRegister(args[1]);
} else {
await_builtin_context_index =
catch_prediction() == HandlerTable::ASYNC_AWAIT
? Context::ASYNC_FUNCTION_AWAIT_UNCAUGHT_INDEX
: Context::ASYNC_FUNCTION_AWAIT_CAUGHT_INDEX;
id = catch_prediction() == HandlerTable::ASYNC_AWAIT
? Runtime::kInlineAsyncFunctionAwaitUncaught
: Runtime::kInlineAsyncFunctionAwaitCaught;
args = register_allocator()->NewRegisterList(3);
builder()
->MoveRegister(generator_object(), args[0])
......@@ -3220,7 +3218,7 @@ void BytecodeGenerator::BuildAwait(Expression* await_expr) {
builder()->StoreAccumulatorInRegister(args[2]);
}
builder()->CallJSRuntime(await_builtin_context_index, args);
builder()->CallRuntime(id, args);
}
BuildSuspendPoint(await_expr);
......
......@@ -462,6 +462,30 @@ Node* IntrinsicsGenerator::GetImportMetaObject(
return return_value.value();
}
Node* IntrinsicsGenerator::AsyncFunctionAwaitCaught(
const InterpreterAssembler::RegListNodePair& args, Node* context) {
return IntrinsicAsBuiltinCall(args, context,
Builtins::kAsyncFunctionAwaitCaught);
}
Node* IntrinsicsGenerator::AsyncFunctionAwaitUncaught(
const InterpreterAssembler::RegListNodePair& args, Node* context) {
return IntrinsicAsBuiltinCall(args, context,
Builtins::kAsyncFunctionAwaitUncaught);
}
Node* IntrinsicsGenerator::AsyncGeneratorAwaitCaught(
const InterpreterAssembler::RegListNodePair& args, Node* context) {
return IntrinsicAsBuiltinCall(args, context,
Builtins::kAsyncGeneratorAwaitCaught);
}
Node* IntrinsicsGenerator::AsyncGeneratorAwaitUncaught(
const InterpreterAssembler::RegListNodePair& args, Node* context) {
return IntrinsicAsBuiltinCall(args, context,
Builtins::kAsyncGeneratorAwaitUncaught);
}
Node* IntrinsicsGenerator::AsyncGeneratorReject(
const InterpreterAssembler::RegListNodePair& args, Node* context) {
return IntrinsicAsBuiltinCall(args, context, Builtins::kAsyncGeneratorReject);
......
......@@ -14,6 +14,10 @@ namespace interpreter {
// List of supported intrisics, with upper case name, lower case name and
// expected number of arguments (-1 denoting argument count is variable).
#define INTRINSICS_LIST(V) \
V(AsyncFunctionAwaitCaught, async_function_await_caught, 3) \
V(AsyncFunctionAwaitUncaught, async_function_await_uncaught, 3) \
V(AsyncGeneratorAwaitCaught, async_generator_await_caught, 2) \
V(AsyncGeneratorAwaitUncaught, async_generator_await_uncaught, 2) \
V(AsyncGeneratorReject, async_generator_reject, 2) \
V(AsyncGeneratorResolve, async_generator_resolve, 3) \
V(AsyncGeneratorYield, async_generator_yield, 3) \
......
......@@ -70,6 +70,30 @@ RUNTIME_FUNCTION(Runtime_GeneratorGetInputOrDebugPos) {
UNREACHABLE();
}
RUNTIME_FUNCTION(Runtime_AsyncFunctionAwaitCaught) {
// Runtime call is implemented in InterpreterIntrinsics and lowered in
// JSIntrinsicLowering
UNREACHABLE();
}
RUNTIME_FUNCTION(Runtime_AsyncFunctionAwaitUncaught) {
// Runtime call is implemented in InterpreterIntrinsics and lowered in
// JSIntrinsicLowering
UNREACHABLE();
}
RUNTIME_FUNCTION(Runtime_AsyncGeneratorAwaitCaught) {
// Runtime call is implemented in InterpreterIntrinsics and lowered in
// JSIntrinsicLowering
UNREACHABLE();
}
RUNTIME_FUNCTION(Runtime_AsyncGeneratorAwaitUncaught) {
// Runtime call is implemented in InterpreterIntrinsics and lowered in
// JSIntrinsicLowering
UNREACHABLE();
}
RUNTIME_FUNCTION(Runtime_AsyncGeneratorResolve) {
// Runtime call is implemented in InterpreterIntrinsics and lowered in
// JSIntrinsicLowering
......
......@@ -243,9 +243,13 @@ namespace internal {
F(GeneratorGetFunction, 1, 1) \
F(GeneratorGetReceiver, 1, 1) \
F(GeneratorGetInputOrDebugPos, 1, 1) \
F(AsyncFunctionAwaitCaught, 3, 1) \
F(AsyncFunctionAwaitUncaught, 3, 1) \
F(AsyncGeneratorResolve, 3, 1) \
F(AsyncGeneratorReject, 2, 1) \
F(AsyncGeneratorYield, 3, 1) \
F(AsyncGeneratorAwaitCaught, 2, 1) \
F(AsyncGeneratorAwaitUncaught, 2, 1) \
F(GeneratorGetContinuation, 1, 1) \
F(GeneratorGetSourcePosition, 1, 1) \
F(GeneratorGetResumeMode, 1, 1) \
......
......@@ -39,7 +39,7 @@ bytecodes: [
B(LdaUndefined),
B(Star), R(6),
B(Mov), R(0), R(5),
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(5), U8(2),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(5), U8(2),
B(SuspendGenerator), R(0), R(0), U8(5), U8(1),
B(ResumeGenerator), R(0), R(0), U8(5),
B(Star), R(5),
......@@ -166,7 +166,7 @@ bytecodes: [
B(LdaUndefined),
B(Star), R(6),
B(Mov), R(0), R(5),
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(5), U8(2),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(5), U8(2),
B(SuspendGenerator), R(0), R(0), U8(5), U8(2),
B(ResumeGenerator), R(0), R(0), U8(5),
B(Star), R(5),
......@@ -404,7 +404,7 @@ bytecodes: [
B(LdaUndefined),
B(Star), R(16),
B(Mov), R(2), R(15),
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(15), U8(2),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(15), U8(2),
B(SuspendGenerator), R(2), R(0), U8(15), U8(2),
B(ResumeGenerator), R(2), R(0), U8(15),
B(Star), R(15),
......@@ -580,7 +580,7 @@ bytecodes: [
B(Jump), U8(2),
B(Star), R(13),
B(Mov), R(0), R(12),
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(12), U8(2),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(12), U8(2),
/* 49 E> */ B(SuspendGenerator), R(0), R(0), U8(12), U8(1),
B(ResumeGenerator), R(0), R(0), U8(12),
B(Star), R(12),
......@@ -598,7 +598,7 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kThrowThrowMethodMissing), R(0), U8(0),
B(Star), R(13),
B(Mov), R(0), R(12),
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(12), U8(2),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(12), U8(2),
/* 49 E> */ B(SuspendGenerator), R(0), R(0), U8(12), U8(2),
B(ResumeGenerator), R(0), R(0), U8(12),
B(Star), R(12),
......@@ -639,7 +639,7 @@ bytecodes: [
B(LdaUndefined),
B(Star), R(6),
B(Mov), R(0), R(5),
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(5), U8(2),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(5), U8(2),
B(SuspendGenerator), R(0), R(0), U8(5), U8(4),
B(ResumeGenerator), R(0), R(0), U8(5),
B(Star), R(5),
......
......@@ -53,7 +53,7 @@ bytecodes: [
B(Star), R(21),
B(Mov), R(2), R(20),
B(Mov), R(11), R(22),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(20), U8(3),
/* 40 E> */ B(SuspendGenerator), R(2), R(0), U8(20), U8(0),
B(ResumeGenerator), R(2), R(0), U8(20),
B(Star), R(20),
......@@ -137,7 +137,7 @@ bytecodes: [
B(Star), R(21),
B(Mov), R(2), R(20),
B(Mov), R(11), R(22),
B(CallJSRuntime), U8(%async_function_await_caught), R(20), U8(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitCaught), R(20), U8(3),
B(SuspendGenerator), R(2), R(0), U8(20), U8(1),
B(ResumeGenerator), R(2), R(0), U8(20),
B(Star), R(20),
......@@ -160,7 +160,7 @@ bytecodes: [
B(Star), R(20),
B(Mov), R(2), R(19),
B(Mov), R(11), R(21),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(19), U8(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(19), U8(3),
B(SuspendGenerator), R(2), R(0), U8(19), U8(2),
B(ResumeGenerator), R(2), R(0), U8(19),
B(Star), R(19),
......@@ -306,7 +306,7 @@ bytecodes: [
B(Star), R(21),
B(Mov), R(2), R(20),
B(Mov), R(11), R(22),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(20), U8(3),
/* 40 E> */ B(SuspendGenerator), R(2), R(0), U8(20), U8(0),
B(ResumeGenerator), R(2), R(0), U8(20),
B(Star), R(20),
......@@ -391,7 +391,7 @@ bytecodes: [
B(Star), R(21),
B(Mov), R(2), R(20),
B(Mov), R(11), R(22),
B(CallJSRuntime), U8(%async_function_await_caught), R(20), U8(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitCaught), R(20), U8(3),
B(SuspendGenerator), R(2), R(0), U8(20), U8(1),
B(ResumeGenerator), R(2), R(0), U8(20),
B(Star), R(20),
......@@ -414,7 +414,7 @@ bytecodes: [
B(Star), R(20),
B(Mov), R(2), R(19),
B(Mov), R(11), R(21),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(19), U8(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(19), U8(3),
B(SuspendGenerator), R(2), R(0), U8(19), U8(2),
B(ResumeGenerator), R(2), R(0), U8(19),
B(Star), R(19),
......@@ -575,7 +575,7 @@ bytecodes: [
B(Star), R(21),
B(Mov), R(2), R(20),
B(Mov), R(11), R(22),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(20), U8(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(20), U8(3),
/* 40 E> */ B(SuspendGenerator), R(2), R(0), U8(20), U8(0),
B(ResumeGenerator), R(2), R(0), U8(20),
B(Star), R(20),
......@@ -667,7 +667,7 @@ bytecodes: [
B(Star), R(21),
B(Mov), R(2), R(20),
B(Mov), R(11), R(22),
B(CallJSRuntime), U8(%async_function_await_caught), R(20), U8(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitCaught), R(20), U8(3),
B(SuspendGenerator), R(2), R(0), U8(20), U8(1),
B(ResumeGenerator), R(2), R(0), U8(20),
B(Star), R(20),
......@@ -690,7 +690,7 @@ bytecodes: [
B(Star), R(20),
B(Mov), R(2), R(19),
B(Mov), R(11), R(21),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(19), U8(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(19), U8(3),
B(SuspendGenerator), R(2), R(0), U8(19), U8(2),
B(ResumeGenerator), R(2), R(0), U8(19),
B(Star), R(19),
......
......@@ -1196,7 +1196,7 @@ bytecodes: [
/* 45 S> */ B(Mov), R(2), R(21),
B(Mov), R(0), R(22),
B(Mov), R(11), R(23),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(21), U8(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(21), U8(3),
/* 45 E> */ B(SuspendGenerator), R(2), R(0), U8(21), U8(0),
B(ResumeGenerator), R(2), R(0), U8(21),
B(Star), R(21),
......
......@@ -493,7 +493,7 @@ bytecodes: [
/* 52 S> */ B(Mov), R(1), R(7),
B(Mov), R(0), R(8),
B(Mov), R(2), R(9),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(7), U8(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(7), U8(3),
/* 52 E> */ B(SuspendGenerator), R(1), R(0), U8(7), U8(0),
B(ResumeGenerator), R(1), R(0), U8(7),
B(Star), R(7),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment