Reland: [ignition] Be smarter about register allocation in VisitSuspend

Split BytecodeGenerator::VisitSuspend into two pieces, one for
building the suspension code and one for resumption (these
are split into separate Build methods for convenience).
Each gets its own RegisterAllocationScope, which allows us to
reduce the register file size of the empty generator by 1.

For consistency, rename VisitGeneratorPrologue() to
BuildGeneratorPrologue() to match the names of the two
newly-created methods.

This relands the patch originally committed in
98927ea51b, as the test failure
due to that change was a code flushing bug. Code flushing was
disabled in de4a4095cf.

R=rmcilroy@chromium.org

Bug: v8:6379
Change-Id: Ifb4deafea99693c0a4e8646cf4e9884c7374cfc6
Reviewed-on: https://chromium-review.googlesource.com/508814
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45406}
This commit is contained in:
Adam Klein 2017-05-18 12:45:52 -07:00 committed by Commit Bot
parent afdf27fc78
commit 5dc2d6f6c5
9 changed files with 754 additions and 710 deletions

View File

@ -2461,12 +2461,13 @@ void BytecodeGenerator::VisitAssignment(Assignment* expr) {
}
}
void BytecodeGenerator::VisitSuspend(Suspend* expr) {
void BytecodeGenerator::BuildGeneratorSuspend(Suspend* expr,
Register generator) {
RegisterAllocationScope register_scope(this);
builder()->SetExpressionPosition(expr);
Register value = VisitForRegisterValue(expr->expression());
Register generator = VisitForRegisterValue(expr->generator_object());
// Save context, registers, and state. Then return.
builder()
->LoadLiteral(Smi::FromInt(expr->suspend_id()))
@ -2489,11 +2490,10 @@ void BytecodeGenerator::VisitSuspend(Suspend* expr) {
builder()->LoadAccumulatorWithRegister(value);
}
builder()->Return(); // Hard return (ignore any finally blocks).
}
builder()->Bind(generator_jump_table_, static_cast<int>(expr->suspend_id()));
// Upon resume, we continue here.
{
void BytecodeGenerator::BuildGeneratorResume(Suspend* expr,
Register generator) {
RegisterAllocationScope register_scope(this);
// Update state to indicate that we have finished resuming. Loop headers
@ -2561,7 +2561,14 @@ void BytecodeGenerator::VisitSuspend(Suspend* expr) {
builder()->Bind(&resume_with_next);
builder()->LoadAccumulatorWithRegister(input);
}
}
void BytecodeGenerator::VisitSuspend(Suspend* expr) {
Register generator = VisitForRegisterValue(expr->generator_object());
BuildGeneratorSuspend(expr, generator);
builder()->Bind(generator_jump_table_, static_cast<int>(expr->suspend_id()));
// Upon resume, we continue here.
BuildGeneratorResume(expr, generator);
}
void BytecodeGenerator::VisitThrow(Throw* expr) {

View File

@ -135,6 +135,8 @@ class BytecodeGenerator final : public AstVisitor<BytecodeGenerator> {
void BuildNewLocalWithContext(Scope* scope);
void BuildGeneratorPrologue();
void BuildGeneratorSuspend(Suspend* expr, Register generator);
void BuildGeneratorResume(Suspend* expr, Register generator);
void VisitArgumentsObject(Variable* variable);
void VisitRestArgumentsArray(Variable* rest);

View File

@ -14,7 +14,7 @@ snippet: "
}
f();
"
frame size: 19
frame size: 18
parameter count: 1
bytecode array length: 953
bytecodes: [
@ -75,54 +75,54 @@ bytecodes: [
B(LdaSmi), I8(79),
B(Star), R(13),
B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
/* 40 S> */ B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(14),
B(LdaNamedProperty), R(14), U8(8), U8(14),
/* 40 S> */ B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(13),
/* 40 E> */ B(CallProperty0), R(13), R(14), U8(12),
/* 40 S> */ B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(15),
B(LdaNamedProperty), R(15), U8(8), U8(14),
B(Star), R(14),
/* 40 E> */ B(CallProperty0), R(14), R(15), U8(12),
B(StaContextSlot), R(1), U8(9), U8(0),
/* 40 S> */ B(LdaUndefined),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(14),
B(LdaContextSlot), R(1), U8(9), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(13), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(9), U8(0),
B(Star), R(16),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(17),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(14), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(14),
B(LdaZero),
B(SuspendGenerator), R(14), U8(2),
B(Ldar), R(13),
B(SuspendGenerator), R(13), U8(2),
B(Ldar), R(14),
/* 57 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(14), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(13), U8(1),
B(Star), R(14),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(13), U8(1),
B(Star), R(15),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(14), U8(1),
B(Star), R(16),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(16),
B(TestEqualStrictNoFeedback), R(15),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(16),
B(TestEqualStrictNoFeedback), R(15),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(18),
B(Mov), R(15), R(17),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
B(Star), R(17),
B(Mov), R(14), R(16),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
B(Star), R(10),
B(LdaZero),
B(Star), R(9),
B(Jump), U8(155),
B(Ldar), R(15),
B(Ldar), R(14),
B(ReThrow),
B(Ldar), R(15),
B(Ldar), R(14),
/* 40 E> */ B(StaContextSlot), R(1), U8(7), U8(0),
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(15), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(14), U8(1),
B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(13),
B(LdaContextSlot), R(1), U8(7), U8(0),
@ -210,89 +210,28 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
B(Throw),
B(Mov), R(context), R(12),
B(LdaContextSlot), R(1), U8(12), U8(0),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(13),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(LdaContextSlot), R(1), U8(12), U8(0),
B(Star), R(14),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(15),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(14), U8(2),
B(StaContextSlot), R(1), U8(13), U8(0),
B(LdaUndefined),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(14),
B(LdaContextSlot), R(1), U8(13), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_caught), R(13), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(13), U8(0),
B(Star), R(16),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(17),
B(CallJSRuntime), U8(%async_function_await_caught), R(14), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(14),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(14), U8(2),
B(Ldar), R(13),
/* 57 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(14), U8(1),
B(Star), R(15),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(14), U8(1),
B(Star), R(16),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(16),
B(JumpIfTrue), U8(36),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(16),
B(JumpIfTrue), U8(27),
B(LdaTrue),
B(Star), R(18),
B(Mov), R(15), R(17),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
B(PopContext), R(1),
B(PopContext), R(1),
B(PopContext), R(1),
B(PopContext), R(1),
B(Star), R(6),
B(LdaZero),
B(Star), R(5),
B(JumpConstant), U8(22),
B(Ldar), R(15),
B(ReThrow),
B(Ldar), R(15),
B(Jump), U8(20),
B(Star), R(13),
B(Ldar), R(closure),
B(CreateCatchContext), R(13), U8(12), U8(16),
B(Star), R(12),
B(LdaTheHole),
B(SetPendingMessage),
B(Ldar), R(12),
B(PushContext), R(2),
B(PopContext), R(2),
B(Jump), U8(155),
B(LdaContextSlot), R(1), U8(12), U8(0),
B(Star), R(12),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
B(StaContextSlot), R(1), U8(15), U8(0),
B(LdaUndefined),
B(Star), R(12),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(13),
B(LdaContextSlot), R(1), U8(15), U8(0),
B(Star), R(14),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(15),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(12), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(12),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(13),
B(LdaSmi), I8(2),
B(SuspendGenerator), R(13), U8(2),
B(Ldar), R(12),
B(Ldar), R(14),
/* 57 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
@ -317,10 +256,71 @@ bytecodes: [
B(Star), R(6),
B(LdaZero),
B(Star), R(5),
B(Jump), U8(160),
B(JumpConstant), U8(22),
B(Ldar), R(14),
B(ReThrow),
B(Ldar), R(14),
B(Jump), U8(20),
B(Star), R(13),
B(Ldar), R(closure),
B(CreateCatchContext), R(13), U8(12), U8(16),
B(Star), R(12),
B(LdaTheHole),
B(SetPendingMessage),
B(Ldar), R(12),
B(PushContext), R(2),
B(PopContext), R(2),
B(Jump), U8(155),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(12),
B(LdaContextSlot), R(1), U8(12), U8(0),
B(Star), R(13),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(14),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
B(StaContextSlot), R(1), U8(15), U8(0),
B(LdaUndefined),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(14),
B(LdaContextSlot), R(1), U8(15), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(13), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(13),
B(LdaSmi), I8(2),
B(SuspendGenerator), R(12), U8(2),
B(Ldar), R(13),
/* 57 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(12), U8(1),
B(Star), R(13),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(12), U8(1),
B(Star), R(14),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(14),
B(JumpIfTrue), U8(36),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(14),
B(JumpIfTrue), U8(27),
B(LdaTrue),
B(Star), R(16),
B(Mov), R(13), R(15),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
B(PopContext), R(1),
B(PopContext), R(1),
B(PopContext), R(1),
B(PopContext), R(1),
B(Star), R(6),
B(LdaZero),
B(Star), R(5),
B(Jump), U8(160),
B(Ldar), R(13),
B(ReThrow),
B(Ldar), R(13),
B(StaContextSlot), R(1), U8(14), U8(0),
B(LdaContextSlot), R(1), U8(14), U8(0),
B(Star), R(12),
@ -453,7 +453,7 @@ snippet: "
}
f();
"
frame size: 19
frame size: 18
parameter count: 1
bytecode array length: 999
bytecodes: [
@ -514,54 +514,54 @@ bytecodes: [
B(LdaSmi), I8(79),
B(Star), R(13),
B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
/* 40 S> */ B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(14),
B(LdaNamedProperty), R(14), U8(8), U8(14),
/* 40 S> */ B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(13),
/* 40 E> */ B(CallProperty0), R(13), R(14), U8(12),
/* 40 S> */ B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(15),
B(LdaNamedProperty), R(15), U8(8), U8(14),
B(Star), R(14),
/* 40 E> */ B(CallProperty0), R(14), R(15), U8(12),
B(StaContextSlot), R(1), U8(9), U8(0),
/* 40 S> */ B(LdaUndefined),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(14),
B(LdaContextSlot), R(1), U8(9), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(13), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(9), U8(0),
B(Star), R(16),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(17),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(14), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(14),
B(LdaZero),
B(SuspendGenerator), R(14), U8(2),
B(Ldar), R(13),
B(SuspendGenerator), R(13), U8(2),
B(Ldar), R(14),
/* 68 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(14), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(13), U8(1),
B(Star), R(14),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(13), U8(1),
B(Star), R(15),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(14), U8(1),
B(Star), R(16),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(16),
B(TestEqualStrictNoFeedback), R(15),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(16),
B(TestEqualStrictNoFeedback), R(15),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(18),
B(Mov), R(15), R(17),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
B(Star), R(17),
B(Mov), R(14), R(16),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
B(Star), R(10),
B(LdaZero),
B(Star), R(9),
B(Jump), U8(167),
B(Ldar), R(15),
B(Ldar), R(14),
B(ReThrow),
B(Ldar), R(15),
B(Ldar), R(14),
/* 40 E> */ B(StaContextSlot), R(1), U8(7), U8(0),
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(15), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(14), U8(1),
B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(13),
B(LdaContextSlot), R(1), U8(7), U8(0),
@ -656,89 +656,28 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
B(Throw),
B(Mov), R(context), R(12),
B(LdaContextSlot), R(1), U8(12), U8(0),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(13),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(LdaContextSlot), R(1), U8(12), U8(0),
B(Star), R(14),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(15),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(14), U8(2),
B(StaContextSlot), R(1), U8(13), U8(0),
B(LdaUndefined),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(14),
B(LdaContextSlot), R(1), U8(13), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_caught), R(13), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(13), U8(0),
B(Star), R(16),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(17),
B(CallJSRuntime), U8(%async_function_await_caught), R(14), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(14),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(14), U8(2),
B(Ldar), R(13),
/* 68 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(14), U8(1),
B(Star), R(15),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(14), U8(1),
B(Star), R(16),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(16),
B(JumpIfTrue), U8(36),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(16),
B(JumpIfTrue), U8(27),
B(LdaTrue),
B(Star), R(18),
B(Mov), R(15), R(17),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
B(PopContext), R(1),
B(PopContext), R(1),
B(PopContext), R(1),
B(PopContext), R(1),
B(Star), R(6),
B(LdaZero),
B(Star), R(5),
B(JumpConstant), U8(23),
B(Ldar), R(15),
B(ReThrow),
B(Ldar), R(15),
B(Jump), U8(20),
B(Star), R(13),
B(Ldar), R(closure),
B(CreateCatchContext), R(13), U8(12), U8(16),
B(Star), R(12),
B(LdaTheHole),
B(SetPendingMessage),
B(Ldar), R(12),
B(PushContext), R(2),
B(PopContext), R(2),
B(Jump), U8(155),
B(LdaContextSlot), R(1), U8(12), U8(0),
B(Star), R(12),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
B(StaContextSlot), R(1), U8(15), U8(0),
B(LdaUndefined),
B(Star), R(12),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(13),
B(LdaContextSlot), R(1), U8(15), U8(0),
B(Star), R(14),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(15),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(12), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(12),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(13),
B(LdaSmi), I8(2),
B(SuspendGenerator), R(13), U8(2),
B(Ldar), R(12),
B(Ldar), R(14),
/* 68 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
@ -763,10 +702,71 @@ bytecodes: [
B(Star), R(6),
B(LdaZero),
B(Star), R(5),
B(Jump), U8(177),
B(JumpConstant), U8(23),
B(Ldar), R(14),
B(ReThrow),
B(Ldar), R(14),
B(Jump), U8(20),
B(Star), R(13),
B(Ldar), R(closure),
B(CreateCatchContext), R(13), U8(12), U8(16),
B(Star), R(12),
B(LdaTheHole),
B(SetPendingMessage),
B(Ldar), R(12),
B(PushContext), R(2),
B(PopContext), R(2),
B(Jump), U8(155),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(12),
B(LdaContextSlot), R(1), U8(12), U8(0),
B(Star), R(13),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(14),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
B(StaContextSlot), R(1), U8(15), U8(0),
B(LdaUndefined),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(14),
B(LdaContextSlot), R(1), U8(15), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(13), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(13),
B(LdaSmi), I8(2),
B(SuspendGenerator), R(12), U8(2),
B(Ldar), R(13),
/* 68 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(12), U8(1),
B(Star), R(13),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(12), U8(1),
B(Star), R(14),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(14),
B(JumpIfTrue), U8(36),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(14),
B(JumpIfTrue), U8(27),
B(LdaTrue),
B(Star), R(16),
B(Mov), R(13), R(15),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
B(PopContext), R(1),
B(PopContext), R(1),
B(PopContext), R(1),
B(PopContext), R(1),
B(Star), R(6),
B(LdaZero),
B(Star), R(5),
B(Jump), U8(177),
B(Ldar), R(13),
B(ReThrow),
B(Ldar), R(13),
B(StaContextSlot), R(1), U8(14), U8(0),
B(LdaContextSlot), R(1), U8(14), U8(0),
B(Star), R(12),
@ -920,7 +920,7 @@ snippet: "
}
f();
"
frame size: 19
frame size: 18
parameter count: 1
bytecode array length: 987
bytecodes: [
@ -981,54 +981,54 @@ bytecodes: [
B(LdaSmi), I8(79),
B(Star), R(13),
B(CallRuntime), U16(Runtime::kAbort), R(13), U8(1),
/* 40 S> */ B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(14),
B(LdaNamedProperty), R(14), U8(8), U8(14),
/* 40 S> */ B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(13),
/* 40 E> */ B(CallProperty0), R(13), R(14), U8(12),
/* 40 S> */ B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(15),
B(LdaNamedProperty), R(15), U8(8), U8(14),
B(Star), R(14),
/* 40 E> */ B(CallProperty0), R(14), R(15), U8(12),
B(StaContextSlot), R(1), U8(9), U8(0),
/* 40 S> */ B(LdaUndefined),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(14),
B(LdaContextSlot), R(1), U8(9), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(13), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(9), U8(0),
B(Star), R(16),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(17),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(14), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(14),
B(LdaZero),
B(SuspendGenerator), R(14), U8(2),
B(Ldar), R(13),
B(SuspendGenerator), R(13), U8(2),
B(Ldar), R(14),
/* 114 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(14), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(13), U8(1),
B(Star), R(14),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(13), U8(1),
B(Star), R(15),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(14), U8(1),
B(Star), R(16),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(16),
B(TestEqualStrictNoFeedback), R(15),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(16),
B(TestEqualStrictNoFeedback), R(15),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(18),
B(Mov), R(15), R(17),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
B(Star), R(17),
B(Mov), R(14), R(16),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
B(Star), R(10),
B(LdaZero),
B(Star), R(9),
B(Jump), U8(189),
B(Ldar), R(15),
B(Ldar), R(14),
B(ReThrow),
B(Ldar), R(15),
B(Ldar), R(14),
/* 40 E> */ B(StaContextSlot), R(1), U8(7), U8(0),
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(15), U8(1),
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(14), U8(1),
B(ToBooleanLogicalNot),
B(JumpIfFalse), U8(13),
B(LdaContextSlot), R(1), U8(7), U8(0),
@ -1132,89 +1132,28 @@ bytecodes: [
B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
B(Throw),
B(Mov), R(context), R(12),
B(LdaContextSlot), R(1), U8(12), U8(0),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(13),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(LdaContextSlot), R(1), U8(12), U8(0),
B(Star), R(14),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(15),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(14), U8(2),
B(StaContextSlot), R(1), U8(13), U8(0),
B(LdaUndefined),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(14),
B(LdaContextSlot), R(1), U8(13), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_caught), R(13), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(13), U8(0),
B(Star), R(16),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(17),
B(CallJSRuntime), U8(%async_function_await_caught), R(14), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(14),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(14), U8(2),
B(Ldar), R(13),
/* 114 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(14), U8(1),
B(Star), R(15),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(14), U8(1),
B(Star), R(16),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(16),
B(JumpIfTrue), U8(36),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(16),
B(JumpIfTrue), U8(27),
B(LdaTrue),
B(Star), R(18),
B(Mov), R(15), R(17),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
B(PopContext), R(1),
B(PopContext), R(1),
B(PopContext), R(1),
B(PopContext), R(1),
B(Star), R(6),
B(LdaZero),
B(Star), R(5),
B(JumpConstant), U8(22),
B(Ldar), R(15),
B(ReThrow),
B(Ldar), R(15),
B(Jump), U8(20),
B(Star), R(13),
B(Ldar), R(closure),
B(CreateCatchContext), R(13), U8(12), U8(16),
B(Star), R(12),
B(LdaTheHole),
B(SetPendingMessage),
B(Ldar), R(12),
B(PushContext), R(2),
B(PopContext), R(2),
B(Jump), U8(155),
B(LdaContextSlot), R(1), U8(12), U8(0),
B(Star), R(12),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(12), U8(2),
B(StaContextSlot), R(1), U8(15), U8(0),
B(LdaUndefined),
B(Star), R(12),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(13),
B(LdaContextSlot), R(1), U8(15), U8(0),
B(Star), R(14),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(15),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(12), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(12),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(13),
B(LdaSmi), I8(2),
B(SuspendGenerator), R(13), U8(2),
B(Ldar), R(12),
B(Ldar), R(14),
/* 114 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
@ -1239,10 +1178,71 @@ bytecodes: [
B(Star), R(6),
B(LdaZero),
B(Star), R(5),
B(Jump), U8(160),
B(JumpConstant), U8(22),
B(Ldar), R(14),
B(ReThrow),
B(Ldar), R(14),
B(Jump), U8(20),
B(Star), R(13),
B(Ldar), R(closure),
B(CreateCatchContext), R(13), U8(12), U8(16),
B(Star), R(12),
B(LdaTheHole),
B(SetPendingMessage),
B(Ldar), R(12),
B(PushContext), R(2),
B(PopContext), R(2),
B(Jump), U8(155),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(12),
B(LdaContextSlot), R(1), U8(12), U8(0),
B(Star), R(13),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(14),
B(InvokeIntrinsic), U8(Runtime::k_Call), R(13), U8(2),
B(StaContextSlot), R(1), U8(15), U8(0),
B(LdaUndefined),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(14),
B(LdaContextSlot), R(1), U8(15), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(13), U8(4),
B(LdaContextSlot), R(1), U8(10), U8(0),
B(Star), R(13),
B(LdaSmi), I8(2),
B(SuspendGenerator), R(12), U8(2),
B(Ldar), R(13),
/* 114 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(12), U8(1),
B(Star), R(13),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(12), U8(1),
B(Star), R(14),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(14),
B(JumpIfTrue), U8(36),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(14),
B(JumpIfTrue), U8(27),
B(LdaTrue),
B(Star), R(16),
B(Mov), R(13), R(15),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
B(PopContext), R(1),
B(PopContext), R(1),
B(PopContext), R(1),
B(PopContext), R(1),
B(Star), R(6),
B(LdaZero),
B(Star), R(5),
B(Jump), U8(160),
B(Ldar), R(13),
B(ReThrow),
B(Ldar), R(13),
B(StaContextSlot), R(1), U8(14), U8(0),
B(LdaContextSlot), R(1), U8(14), U8(0),
B(Star), R(12),

View File

@ -673,30 +673,30 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(5),
B(Star), R(10),
B(LdaZero),
/* 11 E> */ B(SuspendGenerator), R(10), U8(0),
B(Ldar), R(9),
/* 11 E> */ B(SuspendGenerator), R(9), U8(0),
B(Ldar), R(10),
/* 55 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(4),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(10), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(9), U8(1),
B(Star), R(10),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(9), U8(1),
B(Star), R(11),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(10), U8(1),
B(Star), R(12),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(12),
B(TestEqualStrictNoFeedback), R(11),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(12),
B(TestEqualStrictNoFeedback), R(11),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(14),
B(Mov), R(11), R(13),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
B(Star), R(13),
B(Mov), R(10), R(12),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
B(Star), R(7),
B(LdaZero),
B(Star), R(6),
B(JumpConstant), U8(13),
B(Ldar), R(11),
B(Ldar), R(10),
/* 11 E> */ B(Throw),
B(Ldar), R(closure),
B(CreateBlockContext), U8(1),
@ -922,7 +922,7 @@ snippet: "
}
f([1, 2, 3]);
"
frame size: 18
frame size: 17
parameter count: 2
bytecode array length: 701
bytecodes: [
@ -953,30 +953,30 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(5),
B(Star), R(9),
B(LdaZero),
/* 11 E> */ B(SuspendGenerator), R(9), U8(0),
B(Ldar), R(8),
/* 11 E> */ B(SuspendGenerator), R(8), U8(0),
B(Ldar), R(9),
/* 49 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(9), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(8), U8(1),
B(Star), R(9),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(8), U8(1),
B(Star), R(10),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(9), U8(1),
B(Star), R(11),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(11),
B(TestEqualStrictNoFeedback), R(10),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(11),
B(TestEqualStrictNoFeedback), R(10),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(13),
B(Mov), R(10), R(12),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
B(Star), R(12),
B(Mov), R(9), R(11),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(11), U8(2),
B(Star), R(6),
B(LdaZero),
B(Star), R(5),
B(JumpConstant), U8(16),
B(Ldar), R(10),
B(Ldar), R(9),
/* 11 E> */ B(Throw),
B(Ldar), R(closure),
B(CreateBlockContext), U8(2),
@ -1036,34 +1036,34 @@ bytecodes: [
B(StaCurrentContextSlot), U8(4),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(StaCurrentContextSlot), U8(4),
/* 40 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
/* 40 S> */ B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
B(Star), R(12),
B(LdaFalse),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
B(Star), R(12),
B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
B(LdaFalse),
B(Star), R(14),
/* 46 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
B(Star), R(13),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(13), U8(0),
B(Ldar), R(12),
B(SuspendGenerator), R(12), U8(0),
B(Ldar), R(13),
/* 49 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(13), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(12), U8(1),
B(Star), R(13),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(12), U8(1),
B(Star), R(14),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(13), U8(1),
B(Star), R(15),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(15),
B(TestEqualStrictNoFeedback), R(14),
B(JumpIfTrue), U8(40),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(15),
B(TestEqualStrictNoFeedback), R(14),
B(JumpIfTrue), U8(31),
B(LdaTrue),
B(Star), R(17),
B(Mov), R(14), R(16),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
B(Star), R(16),
B(Mov), R(13), R(15),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
B(PopContext), R(2),
B(PopContext), R(2),
B(PopContext), R(2),
@ -1074,7 +1074,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(8),
B(Jump), U8(71),
B(Ldar), R(14),
B(Ldar), R(13),
/* 40 E> */ B(Throw),
B(PopContext), R(2),
B(LdaZero),
@ -1521,7 +1521,7 @@ snippet: "
}
f([1, 2, 3]);
"
frame size: 19
frame size: 18
parameter count: 2
bytecode array length: 735
bytecodes: [
@ -1610,41 +1610,41 @@ bytecodes: [
B(StaCurrentContextSlot), U8(4),
B(LdaContextSlot), R(1), U8(8), U8(0),
B(StaCurrentContextSlot), U8(4),
/* 45 S> */ B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
B(Star), R(13),
/* 51 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
B(StaContextSlot), R(1), U8(6), U8(0),
/* 45 S> */ B(LdaUndefined),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
B(Star), R(14),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(7), U8(0),
B(Star), R(16),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(13), U8(4),
B(LdaContextSlot), R(1), U8(7), U8(0),
B(Star), R(13),
B(LdaImmutableContextSlot), R(1), U8(5), U8(0),
B(Star), R(15),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(16),
B(LdaContextSlot), R(1), U8(7), U8(0),
B(Star), R(17),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(14), U8(4),
B(LdaContextSlot), R(1), U8(7), U8(0),
B(Star), R(14),
B(LdaZero),
B(SuspendGenerator), R(14), U8(2),
B(Ldar), R(13),
B(SuspendGenerator), R(13), U8(2),
B(Ldar), R(14),
/* 54 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(14), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(13), U8(1),
B(Star), R(14),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(13), U8(1),
B(Star), R(15),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(14), U8(1),
B(Star), R(16),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(16),
B(TestEqualStrictNoFeedback), R(15),
B(JumpIfTrue), U8(40),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(16),
B(TestEqualStrictNoFeedback), R(15),
B(JumpIfTrue), U8(31),
B(LdaTrue),
B(Star), R(18),
B(Mov), R(15), R(17),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(17), U8(2),
B(Star), R(17),
B(Mov), R(14), R(16),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
B(PopContext), R(2),
B(PopContext), R(2),
B(PopContext), R(2),
@ -1655,7 +1655,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(9),
B(Jump), U8(75),
B(Ldar), R(15),
B(Ldar), R(14),
B(ReThrow),
B(PopContext), R(2),
B(LdaZero),

View File

@ -11,7 +11,7 @@ snippet: "
function* f() { }
f();
"
frame size: 12
frame size: 11
parameter count: 1
bytecode array length: 177
bytecodes: [
@ -40,30 +40,30 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(7),
B(LdaZero),
/* 11 E> */ B(SuspendGenerator), R(7), U8(0),
B(Ldar), R(6),
/* 11 E> */ B(SuspendGenerator), R(6), U8(0),
B(Ldar), R(7),
/* 16 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
B(Star), R(7),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
B(Star), R(8),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
B(Star), R(9),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(9),
B(TestEqualStrictNoFeedback), R(8),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(9),
B(TestEqualStrictNoFeedback), R(8),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(11),
B(Mov), R(8), R(10),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(10), U8(2),
B(Star), R(10),
B(Mov), R(7), R(9),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(3),
B(Jump), U8(34),
B(Ldar), R(8),
B(Ldar), R(7),
/* 11 E> */ B(Throw),
B(LdaUndefined),
B(Star), R(6),
@ -112,7 +112,7 @@ snippet: "
function* f() { yield 42 }
f();
"
frame size: 12
frame size: 11
parameter count: 1
bytecode array length: 251
bytecodes: [
@ -141,64 +141,64 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(7),
B(LdaZero),
/* 11 E> */ B(SuspendGenerator), R(7), U8(0),
B(Ldar), R(6),
/* 11 E> */ B(SuspendGenerator), R(6), U8(0),
B(Ldar), R(7),
/* 25 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
B(Star), R(7),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
B(Star), R(8),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
B(Star), R(9),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(9),
B(TestEqualStrictNoFeedback), R(8),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(9),
B(TestEqualStrictNoFeedback), R(8),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(11),
B(Mov), R(8), R(10),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(10), U8(2),
B(Star), R(10),
B(Mov), R(7), R(9),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(3),
B(Jump), U8(108),
B(Ldar), R(8),
B(Ldar), R(7),
/* 11 E> */ B(Throw),
/* 16 S> */ B(LdaSmi), I8(42),
/* 16 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(6),
B(LdaFalse),
B(LdaSmi), I8(42),
B(Star), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
B(Star), R(6),
B(LdaImmutableCurrentContextSlot), U8(4),
B(LdaFalse),
B(Star), R(8),
/* 16 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
B(Star), R(7),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(7), U8(0),
B(Ldar), R(6),
B(SuspendGenerator), R(6), U8(0),
B(Ldar), R(7),
/* 25 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(7), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(6), U8(1),
B(Star), R(7),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(6), U8(1),
B(Star), R(8),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(7), U8(1),
B(Star), R(9),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(9),
B(TestEqualStrictNoFeedback), R(8),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(9),
B(TestEqualStrictNoFeedback), R(8),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(11),
B(Mov), R(8), R(10),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(10), U8(2),
B(Star), R(10),
B(Mov), R(7), R(9),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
B(Star), R(4),
B(LdaZero),
B(Star), R(3),
B(Jump), U8(34),
B(Ldar), R(8),
B(Ldar), R(7),
/* 16 E> */ B(Throw),
B(LdaUndefined),
B(Star), R(6),
@ -248,7 +248,7 @@ snippet: "
function* f() { for (let x of [42]) yield x }
f();
"
frame size: 18
frame size: 17
parameter count: 1
bytecode array length: 697
bytecodes: [
@ -277,30 +277,30 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(9),
B(LdaZero),
/* 11 E> */ B(SuspendGenerator), R(9), U8(0),
B(Ldar), R(8),
/* 11 E> */ B(SuspendGenerator), R(8), U8(0),
B(Ldar), R(9),
/* 44 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(9), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(8), U8(1),
B(Star), R(9),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(8), U8(1),
B(Star), R(10),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(9), U8(1),
B(Star), R(11),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(11),
B(TestEqualStrictNoFeedback), R(10),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(11),
B(TestEqualStrictNoFeedback), R(10),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(13),
B(Mov), R(10), R(12),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
B(Star), R(12),
B(Mov), R(9), R(11),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(11), U8(2),
B(Star), R(6),
B(LdaZero),
B(Star), R(5),
B(JumpConstant), U8(17),
B(Ldar), R(10),
B(Ldar), R(9),
/* 11 E> */ B(Throw),
B(Ldar), R(closure),
B(CreateBlockContext), U8(2),
@ -360,34 +360,34 @@ bytecodes: [
B(StaCurrentContextSlot), U8(4),
B(LdaContextSlot), R(1), U8(5), U8(0),
B(StaCurrentContextSlot), U8(4),
/* 36 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
/* 36 S> */ B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(12),
B(LdaFalse),
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(13),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
B(Star), R(12),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(LdaFalse),
B(Star), R(14),
/* 42 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
B(Star), R(13),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(13), U8(0),
B(Ldar), R(12),
B(SuspendGenerator), R(12), U8(0),
B(Ldar), R(13),
/* 44 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(13), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(12), U8(1),
B(Star), R(13),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(12), U8(1),
B(Star), R(14),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(13), U8(1),
B(Star), R(15),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(15),
B(TestEqualStrictNoFeedback), R(14),
B(JumpIfTrue), U8(40),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(15),
B(TestEqualStrictNoFeedback), R(14),
B(JumpIfTrue), U8(31),
B(LdaTrue),
B(Star), R(17),
B(Mov), R(14), R(16),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(16), U8(2),
B(Star), R(16),
B(Mov), R(13), R(15),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(15), U8(2),
B(PopContext), R(2),
B(PopContext), R(2),
B(PopContext), R(2),
@ -398,7 +398,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(8),
B(Jump), U8(71),
B(Ldar), R(14),
B(Ldar), R(13),
/* 36 E> */ B(Throw),
B(PopContext), R(2),
B(LdaZero),

View File

@ -11,7 +11,7 @@ top level: yes
snippet: "
import \"bar\";
"
frame size: 9
frame size: 8
parameter count: 2
bytecode array length: 136
bytecodes: [
@ -43,29 +43,29 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(4), U8(0),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(3), U8(0),
B(Ldar), R(4),
/* 13 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
B(Star), R(4),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(Star), R(5),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
B(Star), R(6),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(6),
B(TestEqualStrictNoFeedback), R(5),
B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(6),
B(TestEqualStrictNoFeedback), R(5),
B(JumpIfTrue), U8(13),
B(LdaTrue),
B(Star), R(8),
B(Mov), R(5), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
B(Star), R(7),
B(Mov), R(4), R(6),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 13 S> */ B(Return),
B(Ldar), R(5),
B(Ldar), R(4),
/* 0 E> */ B(Throw),
B(Ldar), R(5),
B(Ldar), R(4),
B(StaCurrentContextSlot), U8(5),
B(LdaCurrentContextSlot), U8(5),
B(Star), R(3),
@ -85,7 +85,7 @@ handlers: [
snippet: "
import {foo} from \"bar\";
"
frame size: 9
frame size: 8
parameter count: 2
bytecode array length: 136
bytecodes: [
@ -117,29 +117,29 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(4), U8(0),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(3), U8(0),
B(Ldar), R(4),
/* 24 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
B(Star), R(4),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(Star), R(5),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
B(Star), R(6),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(6),
B(TestEqualStrictNoFeedback), R(5),
B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(6),
B(TestEqualStrictNoFeedback), R(5),
B(JumpIfTrue), U8(13),
B(LdaTrue),
B(Star), R(8),
B(Mov), R(5), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
B(Star), R(7),
B(Mov), R(4), R(6),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 24 S> */ B(Return),
B(Ldar), R(5),
B(Ldar), R(4),
/* 0 E> */ B(Throw),
B(Ldar), R(5),
B(Ldar), R(4),
B(StaCurrentContextSlot), U8(5),
B(LdaCurrentContextSlot), U8(5),
B(Star), R(3),
@ -161,7 +161,7 @@ snippet: "
goo(42);
{ let x; { goo(42) } };
"
frame size: 10
frame size: 9
parameter count: 2
bytecode array length: 198
bytecodes: [
@ -193,27 +193,27 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(5),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(5), U8(0),
B(Ldar), R(4),
/* 0 E> */ B(SuspendGenerator), R(4), U8(0),
B(Ldar), R(5),
/* 64 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(2),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(5), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
B(Star), R(5),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
B(Star), R(6),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(5), U8(1),
B(Star), R(7),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(7),
B(TestEqualStrictNoFeedback), R(6),
B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(7),
B(TestEqualStrictNoFeedback), R(6),
B(JumpIfTrue), U8(13),
B(LdaTrue),
B(Star), R(9),
B(Mov), R(6), R(8),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
B(Star), R(8),
B(Mov), R(5), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
/* 64 S> */ B(Return),
B(Ldar), R(6),
B(Ldar), R(5),
/* 0 E> */ B(Throw),
/* 32 S> */ B(LdaModuleVariable), I8(-1), U8(0),
B(JumpIfNotHole), U8(11),
@ -264,7 +264,7 @@ snippet: "
foo++;
{ let x; { foo++ } };
"
frame size: 10
frame size: 9
parameter count: 2
bytecode array length: 178
bytecodes: [
@ -296,27 +296,27 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(5),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(5), U8(0),
B(Ldar), R(4),
/* 0 E> */ B(SuspendGenerator), R(4), U8(0),
B(Ldar), R(5),
/* 49 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(2),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(5), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
B(Star), R(5),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
B(Star), R(6),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(5), U8(1),
B(Star), R(7),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(7),
B(TestEqualStrictNoFeedback), R(6),
B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(7),
B(TestEqualStrictNoFeedback), R(6),
B(JumpIfTrue), U8(13),
B(LdaTrue),
B(Star), R(9),
B(Mov), R(6), R(8),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
B(Star), R(8),
B(Mov), R(5), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
/* 49 S> */ B(Return),
B(Ldar), R(6),
B(Ldar), R(5),
/* 0 E> */ B(Throw),
/* 17 S> */ B(LdaSmi), I8(42),
/* 17 E> */ B(StaModuleVariable), I8(1), U8(0),
@ -359,7 +359,7 @@ snippet: "
foo++;
{ let x; { foo++ } };
"
frame size: 10
frame size: 9
parameter count: 2
bytecode array length: 182
bytecodes: [
@ -393,27 +393,27 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(5),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(5), U8(0),
B(Ldar), R(4),
/* 0 E> */ B(SuspendGenerator), R(4), U8(0),
B(Ldar), R(5),
/* 49 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(2),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(5), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
B(Star), R(5),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
B(Star), R(6),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(5), U8(1),
B(Star), R(7),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(7),
B(TestEqualStrictNoFeedback), R(6),
B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(7),
B(TestEqualStrictNoFeedback), R(6),
B(JumpIfTrue), U8(13),
B(LdaTrue),
B(Star), R(9),
B(Mov), R(6), R(8),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
B(Star), R(8),
B(Mov), R(5), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
/* 49 S> */ B(Return),
B(Ldar), R(6),
B(Ldar), R(5),
/* 0 E> */ B(Throw),
/* 17 S> */ B(LdaSmi), I8(42),
/* 17 E> */ B(StaModuleVariable), I8(1), U8(0),
@ -456,7 +456,7 @@ snippet: "
foo++;
{ let x; { foo++ } };
"
frame size: 10
frame size: 9
parameter count: 2
bytecode array length: 186
bytecodes: [
@ -490,27 +490,27 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(5),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(5), U8(0),
B(Ldar), R(4),
/* 0 E> */ B(SuspendGenerator), R(4), U8(0),
B(Ldar), R(5),
/* 51 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(2),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(5), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
B(Star), R(5),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
B(Star), R(6),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(5), U8(1),
B(Star), R(7),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(7),
B(TestEqualStrictNoFeedback), R(6),
B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(7),
B(TestEqualStrictNoFeedback), R(6),
B(JumpIfTrue), U8(13),
B(LdaTrue),
B(Star), R(9),
B(Mov), R(6), R(8),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
B(Star), R(8),
B(Mov), R(5), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
/* 51 S> */ B(Return),
B(Ldar), R(6),
B(Ldar), R(5),
/* 0 E> */ B(Throw),
/* 19 S> */ B(LdaSmi), I8(42),
/* 19 E> */ B(StaModuleVariable), I8(1), U8(0),
@ -551,7 +551,7 @@ handlers: [
snippet: "
export default (function () {});
"
frame size: 9
frame size: 8
parameter count: 2
bytecode array length: 147
bytecodes: [
@ -585,29 +585,29 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(4), U8(0),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(3), U8(0),
B(Ldar), R(4),
/* 32 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
B(Star), R(4),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(Star), R(5),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
B(Star), R(6),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(6),
B(TestEqualStrictNoFeedback), R(5),
B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(6),
B(TestEqualStrictNoFeedback), R(5),
B(JumpIfTrue), U8(13),
B(LdaTrue),
B(Star), R(8),
B(Mov), R(5), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
B(Star), R(7),
B(Mov), R(4), R(6),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 32 S> */ B(Return),
B(Ldar), R(5),
B(Ldar), R(4),
/* 0 E> */ B(Throw),
B(Ldar), R(5),
B(Ldar), R(4),
B(StaCurrentContextSlot), U8(5),
B(CreateClosure), U8(2), U8(3), U8(0),
B(StaModuleVariable), I8(1), U8(0),
@ -630,7 +630,7 @@ handlers: [
snippet: "
export default (class {});
"
frame size: 9
frame size: 8
parameter count: 2
bytecode array length: 180
bytecodes: [
@ -664,29 +664,29 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(4), U8(0),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(3), U8(0),
B(Ldar), R(4),
/* 26 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
B(Star), R(4),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(Star), R(5),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
B(Star), R(6),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(6),
B(TestEqualStrictNoFeedback), R(5),
B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(6),
B(TestEqualStrictNoFeedback), R(5),
B(JumpIfTrue), U8(13),
B(LdaTrue),
B(Star), R(8),
B(Mov), R(5), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
B(Star), R(7),
B(Mov), R(4), R(6),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 26 S> */ B(Return),
B(Ldar), R(5),
B(Ldar), R(4),
/* 0 E> */ B(Throw),
B(Ldar), R(5),
B(Ldar), R(4),
B(StaCurrentContextSlot), U8(5),
B(CreateClosure), U8(2), U8(3), U8(0),
B(Star), R(3),
@ -721,7 +721,7 @@ handlers: [
snippet: "
export {foo as goo} from \"bar\"
"
frame size: 9
frame size: 8
parameter count: 2
bytecode array length: 136
bytecodes: [
@ -753,29 +753,29 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(4), U8(0),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(3), U8(0),
B(Ldar), R(4),
/* 30 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
B(Star), R(4),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(Star), R(5),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
B(Star), R(6),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(6),
B(TestEqualStrictNoFeedback), R(5),
B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(6),
B(TestEqualStrictNoFeedback), R(5),
B(JumpIfTrue), U8(13),
B(LdaTrue),
B(Star), R(8),
B(Mov), R(5), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
B(Star), R(7),
B(Mov), R(4), R(6),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 30 S> */ B(Return),
B(Ldar), R(5),
B(Ldar), R(4),
/* 0 E> */ B(Throw),
B(Ldar), R(5),
B(Ldar), R(4),
B(StaCurrentContextSlot), U8(5),
B(LdaCurrentContextSlot), U8(5),
B(Star), R(3),
@ -795,7 +795,7 @@ handlers: [
snippet: "
export * from \"bar\"
"
frame size: 9
frame size: 8
parameter count: 2
bytecode array length: 136
bytecodes: [
@ -827,29 +827,29 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(4), U8(0),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(3), U8(0),
B(Ldar), R(4),
/* 19 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
B(Star), R(4),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(Star), R(5),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
B(Star), R(6),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(6),
B(TestEqualStrictNoFeedback), R(5),
B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(6),
B(TestEqualStrictNoFeedback), R(5),
B(JumpIfTrue), U8(13),
B(LdaTrue),
B(Star), R(8),
B(Mov), R(5), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
B(Star), R(7),
B(Mov), R(4), R(6),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 19 S> */ B(Return),
B(Ldar), R(5),
B(Ldar), R(4),
/* 0 E> */ B(Throw),
B(Ldar), R(5),
B(Ldar), R(4),
B(StaCurrentContextSlot), U8(5),
B(LdaCurrentContextSlot), U8(5),
B(Star), R(3),
@ -870,7 +870,7 @@ snippet: "
import * as foo from \"bar\"
foo.f(foo, foo.x);
"
frame size: 9
frame size: 8
parameter count: 2
bytecode array length: 174
bytecodes: [
@ -906,27 +906,27 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(4),
B(LdaZero),
/* 0 E> */ B(SuspendGenerator), R(4), U8(0),
B(Ldar), R(3),
/* 0 E> */ B(SuspendGenerator), R(3), U8(0),
B(Ldar), R(4),
/* 45 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3), U8(1),
B(Star), R(4),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8(1),
B(Star), R(5),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8(1),
B(Star), R(6),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(6),
B(TestEqualStrictNoFeedback), R(5),
B(JumpIfTrue), U8(22),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(6),
B(TestEqualStrictNoFeedback), R(5),
B(JumpIfTrue), U8(13),
B(LdaTrue),
B(Star), R(8),
B(Mov), R(5), R(7),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(7), U8(2),
B(Star), R(7),
B(Mov), R(4), R(6),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(6), U8(2),
/* 45 S> */ B(Return),
B(Ldar), R(5),
B(Ldar), R(4),
/* 0 E> */ B(Throw),
/* 27 S> */ B(LdaImmutableCurrentContextSlot), U8(5),
B(Star), R(4),

View File

@ -271,7 +271,7 @@ snippet: "
}
f();
"
frame size: 15
frame size: 14
parameter count: 1
bytecode array length: 335
bytecodes: [
@ -300,30 +300,30 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(10),
B(LdaZero),
/* 11 E> */ B(SuspendGenerator), R(10), U8(0),
B(Ldar), R(9),
/* 11 E> */ B(SuspendGenerator), R(9), U8(0),
B(Ldar), R(10),
/* 62 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(4),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(10), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(9), U8(1),
B(Star), R(10),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(9), U8(1),
B(Star), R(11),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(10), U8(1),
B(Star), R(12),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(12),
B(TestEqualStrictNoFeedback), R(11),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(12),
B(TestEqualStrictNoFeedback), R(11),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(14),
B(Mov), R(11), R(13),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
B(Star), R(13),
B(Mov), R(10), R(12),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
B(Star), R(7),
B(LdaZero),
B(Star), R(6),
B(Jump), U8(192),
B(Ldar), R(11),
B(Ldar), R(10),
/* 11 E> */ B(Throw),
B(Ldar), R(closure),
B(CreateBlockContext), U8(1),
@ -446,7 +446,7 @@ snippet: "
}
f();
"
frame size: 14
frame size: 13
parameter count: 1
bytecode array length: 444
bytecodes: [
@ -475,30 +475,30 @@ bytecodes: [
B(LdaImmutableCurrentContextSlot), U8(4),
B(Star), R(9),
B(LdaZero),
/* 11 E> */ B(SuspendGenerator), R(9), U8(0),
B(Ldar), R(8),
/* 11 E> */ B(SuspendGenerator), R(8), U8(0),
B(Ldar), R(9),
/* 56 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(9), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(8), U8(1),
B(Star), R(9),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(8), U8(1),
B(Star), R(10),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(9), U8(1),
B(Star), R(11),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(11),
B(TestEqualStrictNoFeedback), R(10),
B(JumpIfTrue), U8(28),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(11),
B(TestEqualStrictNoFeedback), R(10),
B(JumpIfTrue), U8(19),
B(LdaTrue),
B(Star), R(13),
B(Mov), R(10), R(12),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
B(Star), R(12),
B(Mov), R(9), R(11),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(11), U8(2),
B(Star), R(6),
B(LdaZero),
B(Star), R(5),
B(JumpConstant), U8(6),
B(Ldar), R(10),
B(Ldar), R(9),
/* 11 E> */ B(Throw),
B(Ldar), R(closure),
B(CreateBlockContext), U8(2),
@ -562,34 +562,34 @@ bytecodes: [
B(TestEqual), R(8), U8(6),
B(JumpIfFalse), U8(101),
/* 18 E> */ B(StackCheck),
/* 47 S> */ B(LdaCurrentContextSlot), U8(4),
/* 47 S> */ B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(8),
B(LdaFalse),
B(LdaCurrentContextSlot), U8(4),
B(Star), R(9),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(8), U8(2),
B(Star), R(8),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(LdaFalse),
B(Star), R(10),
/* 53 E> */ B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(9), U8(2),
B(Star), R(9),
B(LdaSmi), I8(1),
B(SuspendGenerator), R(9), U8(0),
B(Ldar), R(8),
B(SuspendGenerator), R(8), U8(0),
B(Ldar), R(9),
/* 56 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(9), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(8), U8(1),
B(Star), R(9),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(8), U8(1),
B(Star), R(10),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(9), U8(1),
B(Star), R(11),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(11),
B(TestEqualStrictNoFeedback), R(10),
B(JumpIfTrue), U8(36),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(11),
B(TestEqualStrictNoFeedback), R(10),
B(JumpIfTrue), U8(27),
B(LdaTrue),
B(Star), R(13),
B(Mov), R(10), R(12),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
B(Star), R(12),
B(Mov), R(9), R(11),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(11), U8(2),
B(PopContext), R(2),
B(PopContext), R(2),
B(PopContext), R(1),
@ -598,7 +598,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(5),
B(Jump), U8(72),
B(Ldar), R(10),
B(Ldar), R(9),
/* 47 E> */ B(Throw),
B(LdaZero),
B(StaContextSlot), R(1), U8(7), U8(0),
@ -836,7 +836,7 @@ snippet: "
}
f();
"
frame size: 15
frame size: 14
parameter count: 1
bytecode array length: 483
bytecodes: [
@ -927,41 +927,41 @@ bytecodes: [
B(TestEqual), R(9), U8(6),
B(JumpIfFalse), U8(128),
/* 23 E> */ B(StackCheck),
/* 52 S> */ B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(9),
/* 58 S> */ B(LdaCurrentContextSlot), U8(4),
B(StaContextSlot), R(1), U8(5), U8(0),
/* 52 S> */ B(LdaUndefined),
B(Star), R(9),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(10),
B(LdaContextSlot), R(1), U8(5), U8(0),
B(Star), R(11),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(12),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(9), U8(4),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(9),
B(LdaImmutableContextSlot), R(1), U8(4), U8(0),
B(Star), R(11),
B(LdaContextSlot), R(1), U8(5), U8(0),
B(Star), R(12),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(13),
B(CallJSRuntime), U8(%async_function_await_uncaught), R(10), U8(4),
B(LdaContextSlot), R(1), U8(6), U8(0),
B(Star), R(10),
B(LdaZero),
B(SuspendGenerator), R(10), U8(2),
B(Ldar), R(9),
B(SuspendGenerator), R(9), U8(2),
B(Ldar), R(10),
/* 61 S> */ B(Return),
B(LdaSmi), I8(-2),
B(Star), R(3),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(10), U8(1),
B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(9), U8(1),
B(Star), R(10),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(9), U8(1),
B(Star), R(11),
B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(10), U8(1),
B(Star), R(12),
B(LdaZero),
B(TestEqualStrictNoFeedback), R(12),
B(TestEqualStrictNoFeedback), R(11),
B(JumpIfTrue), U8(40),
B(LdaSmi), I8(2),
B(TestEqualStrictNoFeedback), R(12),
B(TestEqualStrictNoFeedback), R(11),
B(JumpIfTrue), U8(31),
B(LdaTrue),
B(Star), R(14),
B(Mov), R(11), R(13),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(13), U8(2),
B(Star), R(13),
B(Mov), R(10), R(12),
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(12), U8(2),
B(PopContext), R(2),
B(PopContext), R(2),
B(PopContext), R(1),
@ -972,7 +972,7 @@ bytecodes: [
B(LdaZero),
B(Star), R(5),
B(Jump), U8(134),
B(Ldar), R(11),
B(Ldar), R(10),
B(ReThrow),
B(LdaZero),
B(StaContextSlot), R(1), U8(9), U8(0),

View File

@ -204,17 +204,17 @@ function testClasses() {
|R|}
async function asyncFoo() {
|_|await Promise.resolve().then(v => v |_|* 2|R|);
|_|await Promise.|C|resolve().|C|then(v => v |_|* 2|R|);
|C|return42();
|_|await |C|asyncBoo();
|R|}
async function asyncBoo() {
|_|await Promise.resolve();
|_|await Promise.|C|resolve();
|R|}
async function testAsyncAwait() {
|_|await asyncFoo();
|_|await |C|asyncFoo();
|_|await |C|awaitBoo();
|R|}
@ -247,7 +247,7 @@ async function testPromiseComplex() {
var testPromise = |C|new Promise(resolve => nextTest |_|= resolve|R|);
async function main() {
async function foo() {
|_|await Promise.resolve();
|_|await Promise.|C|resolve();
|_|return 42;
|R|}
var x = |_|1;

View File

@ -798,11 +798,21 @@ break at:
Running test: testAsyncAwait
break at:
async function testAsyncAwait() {
#await asyncFoo();
await awaitBoo();
break at:
async function testAsyncAwait() {
await #asyncFoo();
await awaitBoo();
break at:
async function asyncFoo() {
#await Promise.resolve().then(v => v * 2);
return42();
break at:
async function asyncFoo() {
await Promise.resolve().#then(v => v * 2);
@ -833,6 +843,11 @@ break at:
#}
break at:
async function asyncBoo() {
#await Promise.resolve();
}
break at:
async function asyncBoo() {
await Promise.#resolve();
@ -870,6 +885,11 @@ break at:
#setTimeout(returnCall, 0);
await foo();
break at:
setTimeout(returnCall, 0);
#await foo();
await foo();
break at:
setTimeout(returnCall, 0);
await #foo();
@ -895,6 +915,11 @@ break at:
#setTimeout(resolveNested, 0);
await p;
break at:
setTimeout(resolveNested, 0);
#await p;
}
break at:
setTimeout(resolveNested, 0);
await #p;
@ -925,6 +950,11 @@ break at:
#setTimeout(resolveNested, 0);
await p;
break at:
setTimeout(resolveNested, 0);
#await p;
}
break at:
setTimeout(resolveNested, 0);
await #p;
@ -1052,6 +1082,11 @@ break at:
returnFunction(emptyFunction(), x++, --y, x => 2 * x, returnCall())().a = await #foo((a => 2 *a)(5));
nextTest();
break at:
async function foo() {
#await Promise.resolve();
return 42;
break at:
async function foo() {
await Promise.#resolve();