Commit 9f28c129 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[async] Introduce the notion of a "current microtask".

Change the way we start collecting async stack traces by storing the
current microtask as a root instead of trying to make sense of the
last frame we see. This makes it possible to use the zero cost async
stack traces in Node.js as well (where the last JavaScript frame we
see is not the actual async function, but some frame related to the
main event loop usually).

In addition to the benefit that it now works with Node.js, we can also
extend the new machinery to look through (almost arbitrary) promise
chains. For example this code snippet

```js
(async function() {
  await Promise.resolve().then(() =>
    console.log(new Error().stack));
})();
```

can be made to also show the async function frame, even though at the
point where the stack trace is collected we don't have any async
function on the stack. But instead there's a PromiseReactionJobTask
as "current microtask", and we can dig into the chained promise to
see where the async execution is going to continue and eventually
find the await promise in the chain.

This also removes the removes the need to allocate `.generator_object`
specially during scope resolution.

Bug: v8:7522
Ref: nodejs/node#11865
Tbr: ulan@chromium.org
Design-Document: bit.ly/v8-zero-cost-async-stack-traces
Change-Id: Ib96cb17c2f75cce083a24e5ba2bbb7914e20d203
Reviewed-on: https://chromium-review.googlesource.com/c/1277505
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56590}
parent 1d87634c
......@@ -308,7 +308,6 @@ void DeclarationScope::SetDefaults() {
has_arguments_parameter_ = false;
scope_uses_super_property_ = false;
has_rest_ = false;
has_generator_object_ = false;
sloppy_block_function_map_ = nullptr;
receiver_ = nullptr;
new_target_ = nullptr;
......@@ -776,7 +775,6 @@ Variable* DeclarationScope::DeclareGeneratorObjectVar(
Variable* result = EnsureRareData()->generator_object =
NewTemporary(name, kNotAssigned);
result->set_is_used();
has_generator_object_ = true;
return result;
}
......@@ -1469,7 +1467,6 @@ void DeclarationScope::ResetAfterPreparsing(AstValueFactory* ast_value_factory,
sloppy_block_function_map_ = nullptr;
rare_data_ = nullptr;
has_rest_ = false;
has_generator_object_ = false;
DCHECK_NE(zone_, ast_value_factory->zone());
zone_->ReleaseMemory();
......@@ -2145,15 +2142,6 @@ void DeclarationScope::AllocateReceiver() {
AllocateParameter(receiver(), -1);
}
void DeclarationScope::AllocateGeneratorObject() {
if (!has_generator_object_) return;
DCHECK_NOT_NULL(generator_object_var());
DCHECK_EQ(this, generator_object_var()->scope());
AllocateStackSlot(generator_object_var());
DCHECK_EQ(VariableLocation::LOCAL, generator_object_var()->location());
DCHECK_EQ(kGeneratorObjectVarIndex, generator_object_var()->index());
}
void Scope::AllocateNonParameterLocal(Variable* var) {
DCHECK(var->scope() == this);
if (var->IsUnallocated() && MustAllocate(var)) {
......@@ -2221,14 +2209,6 @@ void Scope::AllocateVariablesRecursively() {
return;
}
// Make sure to allocate the .generator_object (for async functions
// and async generators) first, so that it get's the required stack
// slot 0 in case it's needed. See
// http://bit.ly/v8-zero-cost-async-stack-traces for details.
if (is_function_scope()) {
AsDeclarationScope()->AllocateGeneratorObject();
}
// Allocate variables for inner scopes.
for (Scope* scope = inner_scope_; scope != nullptr; scope = scope->sibling_) {
scope->AllocateVariablesRecursively();
......
......@@ -773,11 +773,6 @@ class V8_EXPORT_PRIVATE DeclarationScope : public Scope {
return GetRareVariable(RareVariable::kGeneratorObject);
}
// For async generators, the .generator_object variable is always
// allocated to a fixed stack slot, such that the stack trace
// construction logic can access it.
static constexpr int kGeneratorObjectVarIndex = 0;
// Parameters. The left-most parameter has index 0.
// Only valid for function and module scopes.
Variable* parameter(int index) const {
......@@ -905,7 +900,6 @@ class V8_EXPORT_PRIVATE DeclarationScope : public Scope {
void AllocateLocals();
void AllocateParameterLocals();
void AllocateReceiver();
void AllocateGeneratorObject();
void ResetAfterPreparsing(AstValueFactory* ast_value_factory, bool aborted);
......@@ -962,8 +956,6 @@ class V8_EXPORT_PRIVATE DeclarationScope : public Scope {
bool force_eager_compilation_ : 1;
// This function scope has a rest parameter.
bool has_rest_ : 1;
// This function scope has a .generator_object variable.
bool has_generator_object_ : 1;
// This scope has a parameter called "arguments".
bool has_arguments_parameter_ : 1;
// This scope uses "super" property ('super.foo').
......
......@@ -911,7 +911,7 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) {
TNode<Context> current_context = GetCurrentContext();
TNode<MicrotaskQueue> microtask_queue = GetDefaultMicrotaskQueue();
Label init_queue_loop(this);
Label init_queue_loop(this), done_init_queue_loop(this);
Goto(&init_queue_loop);
BIND(&init_queue_loop);
{
......@@ -919,7 +919,7 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) {
Label loop(this, &index), loop_next(this);
TNode<IntPtrT> num_tasks = GetPendingMicrotaskCount(microtask_queue);
ReturnIf(IntPtrEqual(num_tasks, IntPtrConstant(0)), UndefinedConstant());
GotoIf(IntPtrEqual(num_tasks, IntPtrConstant(0)), &done_init_queue_loop);
TNode<FixedArray> queue = GetQueuedMicrotasks(microtask_queue);
......@@ -939,6 +939,7 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) {
CSA_ASSERT(this, TaggedIsNotSmi(microtask));
StoreRoot(RootIndex::kCurrentMicrotask, microtask);
TNode<Map> microtask_map = LoadMap(microtask);
TNode<Int32T> microtask_type = LoadMapInstanceType(microtask_map);
......@@ -1121,6 +1122,13 @@ TF_BUILTIN(RunMicrotasks, InternalBuiltinsAssembler) {
Branch(IntPtrLessThan(index.value(), num_tasks), &loop, &init_queue_loop);
}
}
BIND(&done_init_queue_loop);
{
// Reset the "current microtask" on the isolate.
StoreRoot(RootIndex::kCurrentMicrotask, UndefinedConstant());
Return(UndefinedConstant());
}
}
TF_BUILTIN(AllocateInNewSpace, CodeStubAssembler) {
......
......@@ -626,6 +626,9 @@ void Heap::CreateInitialObjects() {
set_hash_seed(*factory->NewByteArray(kInt64Size, TENURED));
InitializeHashSeed();
// There's no "current microtask" in the beginning.
set_current_microtask(roots.undefined_value());
// Allocate cache for single character one byte strings.
set_single_character_string_cache(
*factory->NewFixedArray(String::kMaxOneByteCharCode + 1, TENURED));
......
......@@ -429,10 +429,10 @@ class FrameArrayBuilder {
offset, flags);
}
bool AppendJavaScriptFrame(
void AppendJavaScriptFrame(
FrameSummary::JavaScriptFrameSummary const& summary) {
// Filter out internal frames that we do not want to show.
if (!IsVisibleInStackTrace(summary.function())) return false;
if (!IsVisibleInStackTrace(summary.function())) return;
Handle<AbstractCode> abstract_code = summary.abstract_code();
const int offset = summary.code_offset();
......@@ -453,12 +453,11 @@ class FrameArrayBuilder {
elements_ = FrameArray::AppendJSFrame(
elements_, TheHoleToUndefined(isolate_, summary.receiver()), function,
abstract_code, offset, flags);
return true;
}
bool AppendWasmCompiledFrame(
void AppendWasmCompiledFrame(
FrameSummary::WasmCompiledFrameSummary const& summary) {
if (summary.code()->kind() != wasm::WasmCode::kFunction) return false;
if (summary.code()->kind() != wasm::WasmCode::kFunction) return;
Handle<WasmInstanceObject> instance = summary.wasm_instance();
int flags = 0;
if (instance->module_object()->is_asm_js()) {
......@@ -473,10 +472,9 @@ class FrameArrayBuilder {
elements_ = FrameArray::AppendWasmFrame(
elements_, instance, summary.function_index(), summary.code(),
summary.code_offset(), flags);
return true;
}
bool AppendWasmInterpretedFrame(
void AppendWasmInterpretedFrame(
FrameSummary::WasmInterpretedFrameSummary const& summary) {
Handle<WasmInstanceObject> instance = summary.wasm_instance();
int flags = FrameArray::kIsWasmInterpretedFrame;
......@@ -484,14 +482,13 @@ class FrameArrayBuilder {
elements_ = FrameArray::AppendWasmFrame(elements_, instance,
summary.function_index(), {},
summary.byte_offset(), flags);
return true;
}
bool AppendBuiltinExitFrame(BuiltinExitFrame* exit_frame) {
void AppendBuiltinExitFrame(BuiltinExitFrame* exit_frame) {
Handle<JSFunction> function = handle(exit_frame->function(), isolate_);
// Filter out internal frames that we do not want to show.
if (!IsVisibleInStackTrace(function)) return false;
if (!IsVisibleInStackTrace(function)) return;
Handle<Object> receiver(exit_frame->receiver(), isolate_);
Handle<Code> code(exit_frame->LookupCode(), isolate_);
......@@ -505,8 +502,6 @@ class FrameArrayBuilder {
elements_ = FrameArray::AppendJSFrame(elements_, receiver, function,
Handle<AbstractCode>::cast(code),
offset, flags);
return true;
}
bool full() { return elements_->FrameCount() >= limit_; }
......@@ -648,8 +643,6 @@ void CaptureAsyncStackTrace(Isolate* isolate, Handle<JSPromise> promise,
builder->AppendAsyncFrame(generator_object);
// Try to continue from here.
Handle<JSFunction> function(generator_object->function(), isolate);
Handle<SharedFunctionInfo> shared(function->shared(), isolate);
if (generator_object->IsJSAsyncFunctionObject()) {
Handle<JSAsyncFunctionObject> async_function_object =
Handle<JSAsyncFunctionObject>::cast(generator_object);
......@@ -700,8 +693,6 @@ Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSReceiver> error_object,
// Build the regular stack trace, and remember the last relevant
// frame ID and inlined index (for the async stack trace handling
// below, which starts from this last frame).
int last_frame_index = 0;
StackFrame::Id last_frame_id = StackFrame::NO_ID;
for (StackFrameIterator it(this); !it.done() && !builder.full();
it.Advance()) {
StackFrame* const frame = it.frame();
......@@ -720,37 +711,23 @@ Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSReceiver> error_object,
for (size_t i = frames.size(); i-- != 0 && !builder.full();) {
const auto& summary = frames[i];
if (summary.IsJavaScript()) {
//==================================================================
//=========================================================
// Handle a JavaScript frame.
//==================================================================
//=========================================================
auto const& java_script = summary.AsJavaScript();
if (builder.AppendJavaScriptFrame(java_script)) {
if (IsAsyncFunction(java_script.function()->shared()->kind())) {
last_frame_id = frame->id();
last_frame_index = static_cast<int>(i);
} else {
last_frame_id = StackFrame::NO_ID;
last_frame_index = 0;
}
}
builder.AppendJavaScriptFrame(java_script);
} else if (summary.IsWasmCompiled()) {
//==================================================================
//=========================================================
// Handle a WASM compiled frame.
//==================================================================
//=========================================================
auto const& wasm_compiled = summary.AsWasmCompiled();
if (builder.AppendWasmCompiledFrame(wasm_compiled)) {
last_frame_id = StackFrame::NO_ID;
last_frame_index = 0;
}
builder.AppendWasmCompiledFrame(wasm_compiled);
} else if (summary.IsWasmInterpreted()) {
//==================================================================
//=========================================================
// Handle a WASM interpreted frame.
//==================================================================
//=========================================================
auto const& wasm_interpreted = summary.AsWasmInterpreted();
if (builder.AppendWasmInterpretedFrame(wasm_interpreted)) {
last_frame_id = StackFrame::NO_ID;
last_frame_index = 0;
}
builder.AppendWasmInterpretedFrame(wasm_interpreted);
}
}
break;
......@@ -759,10 +736,7 @@ Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSReceiver> error_object,
case StackFrame::BUILTIN_EXIT:
// BuiltinExitFrames are not standard frames, so they do not have
// Summarize(). However, they may have one JS frame worth showing.
if (builder.AppendBuiltinExitFrame(BuiltinExitFrame::cast(frame))) {
last_frame_id = StackFrame::NO_ID;
last_frame_index = 0;
}
builder.AppendBuiltinExitFrame(BuiltinExitFrame::cast(frame));
break;
default:
......@@ -770,40 +744,44 @@ Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSReceiver> error_object,
}
}
// If --async-stack-traces is enabled, and we ended on a regular JavaScript
// frame above, we can enrich the stack trace with async frames (if this
// last frame corresponds to an async function).
if (FLAG_async_stack_traces && last_frame_id != StackFrame::NO_ID) {
StackFrameIterator it(this);
while (it.frame()->id() != last_frame_id) it.Advance();
FrameInspector inspector(StandardFrame::cast(it.frame()), last_frame_index,
this);
FunctionKind const kind = inspector.GetFunction()->shared()->kind();
if (IsAsyncFunction(kind)) {
Handle<Object> const dot_generator_object =
inspector.GetExpression(DeclarationScope::kGeneratorObjectVarIndex);
if (dot_generator_object->IsUndefined(this)) {
// The .generator_object was not yet initialized (i.e. we see a
// really early exception in the setup of the async generator).
} else if (dot_generator_object->IsJSAsyncFunctionObject()) {
// Reach out to the outer promise of the async function.
Handle<JSAsyncFunctionObject> async_function_object =
Handle<JSAsyncFunctionObject>::cast(dot_generator_object);
Handle<JSPromise> promise(async_function_object->promise(), this);
CaptureAsyncStackTrace(this, promise, &builder);
} else {
// Check if there's a pending async request on the generator object.
Handle<JSAsyncGeneratorObject> async_generator_object =
Handle<JSAsyncGeneratorObject>::cast(dot_generator_object);
if (!async_generator_object->queue()->IsUndefined(this)) {
// Take the promise from the first async generatot request.
Handle<AsyncGeneratorRequest> request(
// If --async-stack-traces are enabled and the "current microtask" is a
// PromiseReactionJobTask, we try to enrich the stack trace with async
// frames.
if (FLAG_async_stack_traces) {
Handle<Object> current_microtask = factory()->current_microtask();
if (current_microtask->IsPromiseReactionJobTask()) {
Handle<PromiseReactionJobTask> promise_reaction_job_task =
Handle<PromiseReactionJobTask>::cast(current_microtask);
// Check if the {reaction} has one of the known async function or
// async generator continuations as its fulfill handler.
if (IsBuiltinFunction(this, promise_reaction_job_task->handler(),
Builtins::kAsyncFunctionAwaitResolveClosure) ||
IsBuiltinFunction(this, promise_reaction_job_task->handler(),
Builtins::kAsyncGeneratorAwaitResolveClosure) ||
IsBuiltinFunction(this, promise_reaction_job_task->handler(),
Builtins::kAsyncGeneratorYieldResolveClosure)) {
// Now peak into the handlers' AwaitContext to get to
// the JSGeneratorObject for the async function.
Handle<Context> context(
JSFunction::cast(promise_reaction_job_task->handler())->context(),
this);
Handle<JSGeneratorObject> generator_object(
JSGeneratorObject::cast(context->extension()), this);
CHECK(generator_object->is_executing());
if (generator_object->IsJSAsyncFunctionObject()) {
Handle<JSAsyncFunctionObject> async_function_object =
Handle<JSAsyncFunctionObject>::cast(generator_object);
Handle<JSPromise> promise(async_function_object->promise(), this);
CaptureAsyncStackTrace(this, promise, &builder);
} else {
Handle<JSAsyncGeneratorObject> async_generator_object =
Handle<JSAsyncGeneratorObject>::cast(generator_object);
Handle<AsyncGeneratorRequest> async_generator_request(
AsyncGeneratorRequest::cast(async_generator_object->queue()),
this);
// We can start collecting an async stack trace from the
// promise on the {request}.
Handle<JSPromise> promise(JSPromise::cast(request->promise()), this);
Handle<JSPromise> promise(
JSPromise::cast(async_generator_request->promise()), this);
CaptureAsyncStackTrace(this, promise, &builder);
}
}
......
......@@ -274,7 +274,9 @@ class Symbol;
NoScriptSharedFunctionInfos) \
V(FixedArray, serialized_objects, SerializedObjects) \
V(FixedArray, serialized_global_proxy_sizes, SerializedGlobalProxySizes) \
V(TemplateList, message_listeners, MessageListeners)
V(TemplateList, message_listeners, MessageListeners) \
/* Support for async stack traces */ \
V(HeapObject, current_microtask, CurrentMicrotask)
// Entries in this list are limited to Smis and are not visited during GC.
#define SMI_ROOT_LIST(V) \
......
......@@ -252,19 +252,19 @@ frame size: 22
parameter count: 1
bytecode array length: 490
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(3),
B(SwitchOnGeneratorState), R(2), U8(0), U8(3),
B(Mov), R(closure), R(11),
B(Mov), R(this), R(12),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(11), U8(2),
B(Star), R(0),
B(Star), R(2),
/* 17 E> */ B(StackCheck),
B(Mov), R(context), R(13),
B(Mov), R(context), R(14),
B(Ldar), R(0),
/* 17 E> */ B(SuspendGenerator), R(0), R(0), U8(15), U8(0),
B(ResumeGenerator), R(0), R(0), U8(15),
B(Ldar), R(2),
/* 17 E> */ B(SuspendGenerator), R(2), R(0), U8(15), U8(0),
B(ResumeGenerator), R(2), R(0), U8(15),
B(Star), R(15),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0),
B(Ldar), R(15),
/* 17 E> */ B(Throw),
......@@ -300,16 +300,16 @@ bytecodes: [
B(Star), R(7),
B(Mov), R(8), R(3),
/* 22 E> */ B(StackCheck),
B(Mov), R(3), R(1),
B(Mov), R(3), R(0),
/* 42 S> */ B(LdaFalse),
B(Star), R(21),
B(Mov), R(0), R(19),
B(Mov), R(1), R(20),
B(Mov), R(2), R(19),
B(Mov), R(0), R(20),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorYield), R(19), U8(3),
/* 42 E> */ B(SuspendGenerator), R(0), R(0), U8(19), U8(1),
B(ResumeGenerator), R(0), R(0), U8(19),
/* 42 E> */ B(SuspendGenerator), R(2), R(0), U8(19), U8(1),
B(ResumeGenerator), R(2), R(0), U8(19),
B(Star), R(19),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(SwitchOnSmiNoFeedback), U8(10), U8(2), I8(0),
B(Ldar), R(19),
/* 42 E> */ B(Throw),
......@@ -398,12 +398,12 @@ bytecodes: [
B(ReThrow),
B(LdaUndefined),
B(Star), R(16),
B(Mov), R(0), R(15),
B(Mov), R(2), R(15),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorAwaitUncaught), R(15), U8(2),
B(SuspendGenerator), R(0), R(0), U8(15), U8(2),
B(ResumeGenerator), R(0), R(0), U8(15),
B(SuspendGenerator), R(2), R(0), U8(15), U8(2),
B(ResumeGenerator), R(2), R(0), U8(15),
B(Star), R(15),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(Star), R(16),
B(LdaZero),
B(TestReferenceEqual), R(16),
......@@ -424,7 +424,7 @@ bytecodes: [
B(PushContext), R(15),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(17),
B(Mov), R(0), R(16),
B(Mov), R(2), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorReject), R(16), U8(2),
B(PopContext), R(15),
B(Star), R(12),
......@@ -441,7 +441,7 @@ bytecodes: [
B(LdaTheHole),
B(SetPendingMessage),
B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(2), U8(1),
B(Ldar), R(13),
B(SetPendingMessage),
B(Ldar), R(11),
......@@ -449,7 +449,7 @@ bytecodes: [
B(Jump), U8(22),
B(LdaTrue),
B(Star), R(16),
B(Mov), R(0), R(14),
B(Mov), R(2), R(14),
B(Mov), R(12), R(15),
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorResolve), R(14), U8(3),
/* 50 S> */ B(Return),
......
......@@ -18,11 +18,11 @@ frame size: 18
parameter count: 1
bytecode array length: 438
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(3),
B(SwitchOnGeneratorState), R(2), U8(0), U8(3),
B(Mov), R(closure), R(11),
B(Mov), R(this), R(12),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(11), U8(2),
B(Star), R(0),
B(Star), R(2),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(11),
B(LdaZero),
......@@ -48,12 +48,12 @@ bytecodes: [
B(Star), R(5),
/* 40 S> */ B(CallProperty0), R(5), R(4), U8(11),
B(Star), R(17),
B(Mov), R(0), R(16),
B(Mov), R(2), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(16), U8(2),
/* 40 E> */ B(SuspendGenerator), R(0), R(0), U8(16), U8(0),
B(ResumeGenerator), R(0), R(0), U8(16),
/* 40 E> */ B(SuspendGenerator), R(2), R(0), U8(16), U8(0),
B(ResumeGenerator), R(2), R(0), U8(16),
B(Star), R(16),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(Star), R(17),
B(LdaZero),
B(TestReferenceEqual), R(17),
......@@ -73,7 +73,7 @@ bytecodes: [
B(Star), R(7),
B(Mov), R(8), R(3),
/* 23 E> */ B(StackCheck),
B(Mov), R(3), R(1),
B(Mov), R(3), R(0),
B(LdaZero),
B(Star), R(7),
B(JumpLoop), U8(79), I8(0),
......@@ -130,12 +130,12 @@ bytecodes: [
B(Mov), R(4), R(17),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2),
B(Star), R(17),
B(Mov), R(0), R(16),
B(Mov), R(2), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitCaught), R(16), U8(2),
B(SuspendGenerator), R(0), R(0), U8(16), U8(1),
B(ResumeGenerator), R(0), R(0), U8(16),
B(SuspendGenerator), R(2), R(0), U8(16), U8(1),
B(ResumeGenerator), R(2), R(0), U8(16),
B(Star), R(16),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(Star), R(17),
B(LdaZero),
B(TestReferenceEqual), R(17),
......@@ -152,12 +152,12 @@ bytecodes: [
B(Mov), R(4), R(16),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(15), U8(2),
B(Star), R(16),
B(Mov), R(0), R(15),
B(Mov), R(2), R(15),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(15), U8(2),
B(SuspendGenerator), R(0), R(0), U8(15), U8(2),
B(ResumeGenerator), R(0), R(0), U8(15),
B(SuspendGenerator), R(2), R(0), U8(15), U8(2),
B(ResumeGenerator), R(2), R(0), U8(15),
B(Star), R(15),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(Star), R(16),
B(LdaZero),
B(TestReferenceEqual), R(16),
......@@ -180,7 +180,7 @@ bytecodes: [
B(Star), R(13),
B(LdaTrue),
B(Star), R(14),
B(Mov), R(0), R(12),
B(Mov), R(2), R(12),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(12), U8(3),
/* 57 S> */ B(Return),
B(Jump), U8(30),
......@@ -195,7 +195,7 @@ bytecodes: [
B(Star), R(14),
B(LdaTrue),
B(Star), R(15),
B(Mov), R(0), R(13),
B(Mov), R(2), R(13),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(13), U8(3),
/* 57 S> */ B(Return),
B(LdaUndefined),
......@@ -234,11 +234,11 @@ frame size: 18
parameter count: 1
bytecode array length: 458
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(3),
B(SwitchOnGeneratorState), R(2), U8(0), U8(3),
B(Mov), R(closure), R(11),
B(Mov), R(this), R(12),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(11), U8(2),
B(Star), R(0),
B(Star), R(2),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(11),
B(LdaZero),
......@@ -264,12 +264,12 @@ bytecodes: [
B(Star), R(5),
/* 40 S> */ B(CallProperty0), R(5), R(4), U8(11),
B(Star), R(17),
B(Mov), R(0), R(16),
B(Mov), R(2), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(16), U8(2),
/* 40 E> */ B(SuspendGenerator), R(0), R(0), U8(16), U8(0),
B(ResumeGenerator), R(0), R(0), U8(16),
/* 40 E> */ B(SuspendGenerator), R(2), R(0), U8(16), U8(0),
B(ResumeGenerator), R(2), R(0), U8(16),
B(Star), R(16),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(Star), R(17),
B(LdaZero),
B(TestReferenceEqual), R(17),
......@@ -289,7 +289,7 @@ bytecodes: [
B(Star), R(7),
B(Mov), R(8), R(3),
/* 23 E> */ B(StackCheck),
B(Mov), R(3), R(1),
B(Mov), R(3), R(0),
/* 56 S> */ B(LdaZero),
B(Star), R(12),
B(Mov), R(8), R(13),
......@@ -347,12 +347,12 @@ bytecodes: [
B(Mov), R(4), R(17),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2),
B(Star), R(17),
B(Mov), R(0), R(16),
B(Mov), R(2), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitCaught), R(16), U8(2),
B(SuspendGenerator), R(0), R(0), U8(16), U8(1),
B(ResumeGenerator), R(0), R(0), U8(16),
B(SuspendGenerator), R(2), R(0), U8(16), U8(1),
B(ResumeGenerator), R(2), R(0), U8(16),
B(Star), R(16),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(Star), R(17),
B(LdaZero),
B(TestReferenceEqual), R(17),
......@@ -369,12 +369,12 @@ bytecodes: [
B(Mov), R(4), R(16),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(15), U8(2),
B(Star), R(16),
B(Mov), R(0), R(15),
B(Mov), R(2), R(15),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(15), U8(2),
B(SuspendGenerator), R(0), R(0), U8(15), U8(2),
B(ResumeGenerator), R(0), R(0), U8(15),
B(SuspendGenerator), R(2), R(0), U8(15), U8(2),
B(ResumeGenerator), R(2), R(0), U8(15),
B(Star), R(15),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(Star), R(16),
B(LdaZero),
B(TestReferenceEqual), R(16),
......@@ -393,7 +393,7 @@ bytecodes: [
B(Jump), U8(19),
B(LdaTrue),
B(Star), R(17),
B(Mov), R(0), R(15),
B(Mov), R(2), R(15),
B(Mov), R(13), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(15), U8(3),
/* 68 S> */ B(Return),
......@@ -403,7 +403,7 @@ bytecodes: [
B(Star), R(13),
B(LdaTrue),
B(Star), R(14),
B(Mov), R(0), R(12),
B(Mov), R(2), R(12),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(12), U8(3),
/* 68 S> */ B(Return),
B(Jump), U8(30),
......@@ -418,7 +418,7 @@ bytecodes: [
B(Star), R(14),
B(LdaTrue),
B(Star), R(15),
B(Mov), R(0), R(13),
B(Mov), R(2), R(13),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(13), U8(3),
/* 68 S> */ B(Return),
B(LdaUndefined),
......@@ -462,11 +462,11 @@ frame size: 18
parameter count: 1
bytecode array length: 456
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(3),
B(SwitchOnGeneratorState), R(2), U8(0), U8(3),
B(Mov), R(closure), R(11),
B(Mov), R(this), R(12),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(11), U8(2),
B(Star), R(0),
B(Star), R(2),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(11),
B(LdaZero),
......@@ -492,12 +492,12 @@ bytecodes: [
B(Star), R(5),
/* 40 S> */ B(CallProperty0), R(5), R(4), U8(11),
B(Star), R(17),
B(Mov), R(0), R(16),
B(Mov), R(2), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(16), U8(2),
/* 40 E> */ B(SuspendGenerator), R(0), R(0), U8(16), U8(0),
B(ResumeGenerator), R(0), R(0), U8(16),
/* 40 E> */ B(SuspendGenerator), R(2), R(0), U8(16), U8(0),
B(ResumeGenerator), R(2), R(0), U8(16),
B(Star), R(16),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(Star), R(17),
B(LdaZero),
B(TestReferenceEqual), R(17),
......@@ -517,13 +517,13 @@ bytecodes: [
B(Star), R(7),
B(Mov), R(8), R(3),
/* 23 E> */ B(StackCheck),
B(Mov), R(3), R(1),
B(Mov), R(3), R(0),
/* 63 S> */ B(LdaSmi), I8(10),
/* 69 E> */ B(TestEqual), R(1), U8(17),
/* 69 E> */ B(TestEqual), R(0), U8(17),
B(JumpIfFalse), U8(4),
/* 76 S> */ B(Jump), U8(14),
/* 90 S> */ B(LdaSmi), I8(20),
/* 96 E> */ B(TestEqual), R(1), U8(18),
/* 96 E> */ B(TestEqual), R(0), U8(18),
B(JumpIfFalse), U8(4),
/* 103 S> */ B(Jump), U8(8),
B(LdaZero),
......@@ -582,12 +582,12 @@ bytecodes: [
B(Mov), R(4), R(17),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2),
B(Star), R(17),
B(Mov), R(0), R(16),
B(Mov), R(2), R(16),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitCaught), R(16), U8(2),
B(SuspendGenerator), R(0), R(0), U8(16), U8(1),
B(ResumeGenerator), R(0), R(0), U8(16),
B(SuspendGenerator), R(2), R(0), U8(16), U8(1),
B(ResumeGenerator), R(2), R(0), U8(16),
B(Star), R(16),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(Star), R(17),
B(LdaZero),
B(TestReferenceEqual), R(17),
......@@ -604,12 +604,12 @@ bytecodes: [
B(Mov), R(4), R(16),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(15), U8(2),
B(Star), R(16),
B(Mov), R(0), R(15),
B(Mov), R(2), R(15),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(15), U8(2),
B(SuspendGenerator), R(0), R(0), U8(15), U8(2),
B(ResumeGenerator), R(0), R(0), U8(15),
B(SuspendGenerator), R(2), R(0), U8(15), U8(2),
B(ResumeGenerator), R(2), R(0), U8(15),
B(Star), R(15),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(Star), R(16),
B(LdaZero),
B(TestReferenceEqual), R(16),
......@@ -632,7 +632,7 @@ bytecodes: [
B(Star), R(13),
B(LdaTrue),
B(Star), R(14),
B(Mov), R(0), R(12),
B(Mov), R(2), R(12),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(12), U8(3),
/* 114 S> */ B(Return),
B(Jump), U8(30),
......@@ -647,7 +647,7 @@ bytecodes: [
B(Star), R(14),
B(LdaTrue),
B(Star), R(15),
B(Mov), R(0), R(13),
B(Mov), R(2), R(13),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(13), U8(3),
/* 114 S> */ B(Return),
B(LdaUndefined),
......
......@@ -611,16 +611,16 @@ frame size: 18
parameter count: 2
bytecode array length: 286
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(SwitchOnGeneratorState), R(3), U8(0), U8(1),
B(Mov), R(closure), R(12),
B(Mov), R(this), R(13),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(12), U8(2),
B(Star), R(0),
B(Star), R(3),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(12), U8(0),
B(ResumeGenerator), R(0), R(0), U8(12),
/* 11 E> */ B(SuspendGenerator), R(3), R(0), U8(12), U8(0),
B(ResumeGenerator), R(3), R(0), U8(12),
B(Star), R(12),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
B(Ldar), R(12),
/* 11 E> */ B(Throw),
......@@ -653,8 +653,8 @@ bytecodes: [
B(Star), R(8),
B(Mov), R(9), R(4),
/* 21 E> */ B(StackCheck),
B(Mov), R(4), R(2),
/* 50 S> */ B(Mov), R(2), R(1),
B(Mov), R(4), R(1),
/* 50 S> */ B(Mov), R(1), R(0),
B(LdaZero),
B(Star), R(8),
B(JumpLoop), U8(47), I8(0),
......@@ -759,16 +759,16 @@ frame size: 17
parameter count: 2
bytecode array length: 330
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(SwitchOnGeneratorState), R(2), U8(0), U8(2),
B(Mov), R(closure), R(11),
B(Mov), R(this), R(12),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(11), U8(2),
B(Star), R(0),
B(Star), R(2),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(11), U8(0),
B(ResumeGenerator), R(0), R(0), U8(11),
/* 11 E> */ B(SuspendGenerator), R(2), R(0), U8(11), U8(0),
B(ResumeGenerator), R(2), R(0), U8(11),
B(Star), R(11),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
B(Ldar), R(11),
/* 11 E> */ B(Throw),
......@@ -801,15 +801,15 @@ bytecodes: [
B(Star), R(7),
B(Mov), R(8), R(3),
/* 21 E> */ B(StackCheck),
B(Mov), R(3), R(1),
B(Mov), R(3), R(0),
/* 40 S> */ B(LdaFalse),
B(Star), R(16),
B(Mov), R(1), R(15),
B(Mov), R(0), R(15),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
/* 40 E> */ B(SuspendGenerator), R(0), R(0), U8(15), U8(1),
B(ResumeGenerator), R(0), R(0), U8(15),
/* 40 E> */ B(SuspendGenerator), R(2), R(0), U8(15), U8(1),
B(ResumeGenerator), R(2), R(0), U8(15),
B(Star), R(15),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(SwitchOnSmiNoFeedback), U8(8), U8(2), I8(0),
B(Ldar), R(15),
/* 40 E> */ B(Throw),
......@@ -931,7 +931,7 @@ bytecodes: [
B(Mov), R(closure), R(12),
B(Mov), R(this), R(13),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(12), U8(2),
B(Star), R(0),
B(Star), R(3),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(12),
B(LdaZero),
......@@ -961,8 +961,8 @@ bytecodes: [
B(Star), R(8),
B(Mov), R(9), R(4),
/* 26 E> */ B(StackCheck),
B(Mov), R(4), R(2),
/* 55 S> */ B(Mov), R(2), R(1),
B(Mov), R(4), R(1),
/* 55 S> */ B(Mov), R(1), R(0),
B(LdaZero),
B(Star), R(8),
B(JumpLoop), U8(47), I8(0),
......@@ -1042,7 +1042,7 @@ bytecodes: [
B(Star), R(14),
B(LdaFalse),
B(Star), R(15),
B(Mov), R(0), R(13),
B(Mov), R(3), R(13),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(13), U8(3),
/* 60 S> */ B(Return),
B(Jump), U8(30),
......@@ -1057,7 +1057,7 @@ bytecodes: [
B(Star), R(15),
B(LdaFalse),
B(Star), R(16),
B(Mov), R(0), R(14),
B(Mov), R(3), R(14),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(14), U8(3),
/* 60 S> */ B(Return),
B(LdaUndefined),
......@@ -1091,11 +1091,11 @@ frame size: 18
parameter count: 2
bytecode array length: 344
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(SwitchOnGeneratorState), R(2), U8(0), U8(1),
B(Mov), R(closure), R(11),
B(Mov), R(this), R(12),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(11), U8(2),
B(Star), R(0),
B(Star), R(2),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(11),
B(LdaZero),
......@@ -1125,14 +1125,14 @@ bytecodes: [
B(Star), R(7),
B(Mov), R(8), R(3),
/* 26 E> */ B(StackCheck),
B(Mov), R(3), R(1),
/* 45 S> */ B(Mov), R(0), R(16),
B(Mov), R(1), R(17),
B(Mov), R(3), R(0),
/* 45 S> */ B(Mov), R(2), R(16),
B(Mov), R(0), R(17),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(16), U8(2),
/* 45 E> */ B(SuspendGenerator), R(0), R(0), U8(16), U8(0),
B(ResumeGenerator), R(0), R(0), U8(16),
/* 45 E> */ B(SuspendGenerator), R(2), R(0), U8(16), U8(0),
B(ResumeGenerator), R(2), R(0), U8(16),
B(Star), R(16),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(Star), R(17),
B(LdaZero),
B(TestReferenceEqual), R(17),
......@@ -1218,7 +1218,7 @@ bytecodes: [
B(Star), R(13),
B(LdaTrue),
B(Star), R(14),
B(Mov), R(0), R(12),
B(Mov), R(2), R(12),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(12), U8(3),
/* 54 S> */ B(Return),
B(Jump), U8(30),
......@@ -1233,7 +1233,7 @@ bytecodes: [
B(Star), R(14),
B(LdaTrue),
B(Star), R(15),
B(Mov), R(0), R(13),
B(Mov), R(2), R(13),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(13), U8(3),
/* 54 S> */ B(Return),
B(LdaUndefined),
......
......@@ -102,16 +102,16 @@ frame size: 17
parameter count: 1
bytecode array length: 333
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(SwitchOnGeneratorState), R(2), U8(0), U8(2),
B(Mov), R(closure), R(11),
B(Mov), R(this), R(12),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(11), U8(2),
B(Star), R(0),
B(Star), R(2),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(11), U8(0),
B(ResumeGenerator), R(0), R(0), U8(11),
/* 11 E> */ B(SuspendGenerator), R(2), R(0), U8(11), U8(0),
B(ResumeGenerator), R(2), R(0), U8(11),
B(Star), R(11),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
B(Ldar), R(11),
/* 11 E> */ B(Throw),
......@@ -145,15 +145,15 @@ bytecodes: [
B(Star), R(7),
B(Mov), R(8), R(3),
/* 16 E> */ B(StackCheck),
B(Mov), R(3), R(1),
B(Mov), R(3), R(0),
/* 36 S> */ B(LdaFalse),
B(Star), R(16),
B(Mov), R(1), R(15),
B(Mov), R(0), R(15),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
/* 36 E> */ B(SuspendGenerator), R(0), R(0), U8(15), U8(1),
B(ResumeGenerator), R(0), R(0), U8(15),
/* 36 E> */ B(SuspendGenerator), R(2), R(0), U8(15), U8(1),
B(ResumeGenerator), R(2), R(0), U8(15),
B(Star), R(15),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(SwitchOnSmiNoFeedback), U8(9), U8(2), I8(0),
B(Ldar), R(15),
/* 36 E> */ B(Throw),
......
......@@ -272,31 +272,31 @@ frame size: 5
parameter count: 1
bytecode array length: 67
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(SwitchOnGeneratorState), R(2), U8(0), U8(1),
B(Mov), R(closure), R(3),
B(Mov), R(this), R(4),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(3), U8(2),
B(Star), R(0),
B(Star), R(2),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
B(ResumeGenerator), R(0), R(0), U8(3),
/* 11 E> */ B(SuspendGenerator), R(2), R(0), U8(3), U8(0),
B(ResumeGenerator), R(2), R(0), U8(3),
B(Star), R(3),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
B(Ldar), R(3),
/* 11 E> */ B(Throw),
B(Ldar), R(3),
/* 62 S> */ B(Return),
/* 31 S> */ B(LdaZero),
B(Star), R(2),
B(Star), R(1),
/* 36 S> */ B(LdaSmi), I8(10),
/* 36 E> */ B(TestLessThan), R(2), U8(0),
/* 36 E> */ B(TestLessThan), R(1), U8(0),
B(JumpIfFalse), U8(15),
/* 18 E> */ B(StackCheck),
/* 57 S> */ B(Mov), R(2), R(1),
/* 44 S> */ B(Ldar), R(1),
/* 57 S> */ B(Mov), R(1), R(0),
/* 44 S> */ B(Ldar), R(0),
B(Inc), U8(1),
B(Star), R(2),
B(Star), R(1),
B(JumpLoop), U8(17), I8(0),
B(LdaUndefined),
/* 62 S> */ B(Return),
......@@ -320,43 +320,43 @@ frame size: 4
parameter count: 1
bytecode array length: 99
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
B(SwitchOnGeneratorState), R(1), U8(0), U8(2),
B(Mov), R(closure), R(2),
B(Mov), R(this), R(3),
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(2), U8(2),
B(Star), R(0),
B(Star), R(1),
/* 11 E> */ B(StackCheck),
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(0),
B(ResumeGenerator), R(0), R(0), U8(2),
/* 11 E> */ B(SuspendGenerator), R(1), R(0), U8(2), U8(0),
B(ResumeGenerator), R(1), R(0), U8(2),
B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
B(Ldar), R(2),
/* 11 E> */ B(Throw),
B(Ldar), R(2),
/* 56 S> */ B(Return),
/* 31 S> */ B(LdaZero),
B(Star), R(1),
B(Star), R(0),
/* 36 S> */ B(LdaSmi), I8(10),
/* 36 E> */ B(TestLessThan), R(1), U8(0),
/* 36 E> */ B(TestLessThan), R(0), U8(0),
B(JumpIfFalse), U8(47),
/* 18 E> */ B(StackCheck),
/* 47 S> */ B(LdaFalse),
B(Star), R(3),
B(Mov), R(1), R(2),
B(Mov), R(0), R(2),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(2), U8(2),
/* 47 E> */ B(SuspendGenerator), R(0), R(0), U8(2), U8(1),
B(ResumeGenerator), R(0), R(0), U8(2),
/* 47 E> */ B(SuspendGenerator), R(1), R(0), U8(2), U8(1),
B(ResumeGenerator), R(1), R(0), U8(2),
B(Star), R(2),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
B(SwitchOnSmiNoFeedback), U8(4), U8(2), I8(0),
B(Ldar), R(2),
/* 47 E> */ B(Throw),
B(Ldar), R(2),
/* 56 S> */ B(Return),
/* 44 S> */ B(Ldar), R(1),
/* 44 S> */ B(Ldar), R(0),
B(Inc), U8(1),
B(Star), R(1),
B(Star), R(0),
B(JumpLoop), U8(49), I8(0),
B(LdaUndefined),
/* 56 S> */ B(Return),
......@@ -386,25 +386,25 @@ bytecodes: [
B(Mov), R(closure), R(3),
B(Mov), R(this), R(4),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(3), U8(2),
B(Star), R(0),
B(Star), R(2),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(3),
/* 36 S> */ B(LdaZero),
B(Star), R(2),
B(Star), R(1),
/* 41 S> */ B(LdaSmi), I8(10),
/* 41 E> */ B(TestLessThan), R(2), U8(0),
/* 41 E> */ B(TestLessThan), R(1), U8(0),
B(JumpIfFalse), U8(15),
/* 23 E> */ B(StackCheck),
/* 62 S> */ B(Mov), R(2), R(1),
/* 49 S> */ B(Ldar), R(1),
/* 62 S> */ B(Mov), R(1), R(0),
/* 49 S> */ B(Ldar), R(0),
B(Inc), U8(1),
B(Star), R(2),
B(Star), R(1),
B(JumpLoop), U8(17), I8(0),
B(LdaUndefined),
B(Star), R(5),
B(LdaFalse),
B(Star), R(6),
B(Mov), R(0), R(4),
B(Mov), R(2), R(4),
/* 49 E> */ B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(4), U8(3),
/* 67 S> */ B(Return),
B(Jump), U8(30),
......@@ -419,7 +419,7 @@ bytecodes: [
B(Star), R(6),
B(LdaFalse),
B(Star), R(7),
B(Mov), R(0), R(5),
B(Mov), R(2), R(5),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(5), U8(3),
/* 67 S> */ B(Return),
B(LdaUndefined),
......@@ -443,41 +443,41 @@ frame size: 7
parameter count: 1
bytecode array length: 121
bytecodes: [
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
B(SwitchOnGeneratorState), R(1), U8(0), U8(1),
B(Mov), R(closure), R(2),
B(Mov), R(this), R(3),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(2), U8(2),
B(Star), R(0),
B(Star), R(1),
/* 16 E> */ B(StackCheck),
B(Mov), R(context), R(2),
/* 36 S> */ B(LdaZero),
B(Star), R(1),
B(Star), R(0),
/* 41 S> */ B(LdaSmi), I8(10),
/* 41 E> */ B(TestLessThan), R(1), U8(0),
/* 41 E> */ B(TestLessThan), R(0), U8(0),
B(JumpIfFalse), U8(47),
/* 23 E> */ B(StackCheck),
/* 52 S> */ B(Mov), R(0), R(3),
B(Mov), R(1), R(4),
/* 52 S> */ B(Mov), R(1), R(3),
B(Mov), R(0), R(4),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(3), U8(2),
/* 52 E> */ B(SuspendGenerator), R(0), R(0), U8(3), U8(0),
B(ResumeGenerator), R(0), R(0), U8(3),
/* 52 E> */ B(SuspendGenerator), R(1), R(0), U8(3), U8(0),
B(ResumeGenerator), R(1), R(0), U8(3),
B(Star), R(3),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(1), U8(1),
B(Star), R(4),
B(LdaZero),
B(TestReferenceEqual), R(4),
B(JumpIfTrue), U8(5),
B(Ldar), R(3),
B(ReThrow),
/* 49 S> */ B(Ldar), R(1),
/* 49 S> */ B(Ldar), R(0),
B(Inc), U8(1),
B(Star), R(1),
B(Star), R(0),
B(JumpLoop), U8(49), I8(0),
B(LdaUndefined),
B(Star), R(4),
B(LdaTrue),
B(Star), R(5),
B(Mov), R(0), R(3),
B(Mov), R(1), R(3),
/* 49 E> */ B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(3), U8(3),
/* 61 S> */ B(Return),
B(Jump), U8(30),
......@@ -492,7 +492,7 @@ bytecodes: [
B(Star), R(5),
B(LdaTrue),
B(Star), R(6),
B(Mov), R(0), R(4),
B(Mov), R(1), R(4),
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(4), U8(3),
/* 61 S> */ B(Return),
B(LdaUndefined),
......
......@@ -40,6 +40,7 @@ bool IsInitiallyMutable(Factory* factory, Address object_address) {
V(api_private_symbol_table) \
V(api_symbol_table) \
V(builtins_constants_table) \
V(current_microtask) \
V(detached_contexts) \
V(feedback_vectors_for_profiling_tools) \
V(materialized_objects) \
......
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