e5df5bd044
For deferred commands (such as in try-finally), some deferred commands save and restore the accumulator using a result register (e.g. return, throw, rethrow), while others don't (e.g. break, continue, fall-through). However, conditionally reading this result register that may not ever be written caused it to be considered live from the start of the function, as far as the liveness analysis could statically tell. Now, we write the result register for all deferred commands, including the fall-through. As a micro-optimization, we re-use the Smi command tokeen to clobber the result, rather than emitting an LdaUndefined. Bug: chromium:758472 Change-Id: I2ea65e2249b40ee6403216e654a8bb88d50bec3b Reviewed-on: https://chromium-review.googlesource.com/635592 Commit-Queue: Leszek Swirski <leszeks@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#47612}
857 lines
32 KiB
Plaintext
857 lines
32 KiB
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
wrap: no
|
|
test function name: f
|
|
async iteration: yes
|
|
|
|
---
|
|
snippet: "
|
|
async function* f() { }
|
|
f();
|
|
"
|
|
frame size: 9
|
|
parameter count: 1
|
|
bytecode array length: 237
|
|
bytecodes: [
|
|
B(Ldar), R(0),
|
|
B(JumpIfUndefined), U8(25),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
|
|
B(PushContext), R(2),
|
|
B(RestoreGeneratorState), R(0),
|
|
B(Star), R(1),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
|
|
B(LdaSmi), I8(45),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(1),
|
|
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),
|
|
/* 17 E> */ B(StackCheck),
|
|
B(Mov), R(context), R(4),
|
|
B(Mov), R(context), R(5),
|
|
B(Ldar), R(0),
|
|
/* 17 E> */ B(SuspendGenerator), R(0), R(0), U8(6), U8(0),
|
|
/* 22 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(6),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(1),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
|
B(Ldar), R(6),
|
|
/* 17 E> */ B(Throw),
|
|
B(LdaZero),
|
|
B(Star), R(2),
|
|
B(Mov), R(6), R(3),
|
|
B(Jump), U8(107),
|
|
B(LdaUndefined),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(6),
|
|
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(6), U8(2),
|
|
B(SuspendGenerator), R(0), R(0), U8(6), U8(1),
|
|
/* 22 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(6),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(1),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(7),
|
|
B(LdaZero),
|
|
B(TestEqualStrictNoFeedback), R(7),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(6),
|
|
B(ReThrow),
|
|
B(LdaZero),
|
|
B(Star), R(2),
|
|
B(Mov), R(6), R(3),
|
|
B(Jump), U8(55),
|
|
B(Jump), U8(39),
|
|
B(Star), R(6),
|
|
B(Ldar), R(closure),
|
|
B(CreateCatchContext), R(6), U8(4), U8(5),
|
|
B(Star), R(5),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(5),
|
|
B(PushContext), R(6),
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
|
B(Star), R(8),
|
|
B(Mov), R(0), R(7),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorReject), R(7), U8(2),
|
|
B(PopContext), R(6),
|
|
B(Star), R(3),
|
|
B(LdaSmi), I8(1),
|
|
B(Star), R(2),
|
|
B(Jump), U8(16),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(3),
|
|
B(Star), R(2),
|
|
B(Jump), U8(8),
|
|
B(Star), R(3),
|
|
B(LdaSmi), I8(2),
|
|
B(Star), R(2),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(0), U8(1),
|
|
B(Ldar), R(4),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(2),
|
|
B(SwitchOnSmiNoFeedback), U8(6), U8(3), I8(0),
|
|
B(Jump), U8(22),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(5),
|
|
B(Mov), R(3), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorResolve), R(5), U8(3),
|
|
/* 22 S> */ B(Return),
|
|
B(Ldar), R(3),
|
|
/* 22 S> */ B(Return),
|
|
B(Ldar), R(3),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
/* 22 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [44],
|
|
Smi [93],
|
|
Smi [15],
|
|
Smi [7],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [6],
|
|
Smi [20],
|
|
Smi [23],
|
|
]
|
|
handlers: [
|
|
[47, 182, 190],
|
|
[50, 143, 145],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
async function* f() { yield 42 }
|
|
f();
|
|
"
|
|
frame size: 9
|
|
parameter count: 1
|
|
bytecode array length: 290
|
|
bytecodes: [
|
|
B(Ldar), R(0),
|
|
B(JumpIfUndefined), U8(25),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
|
|
B(PushContext), R(2),
|
|
B(RestoreGeneratorState), R(0),
|
|
B(Star), R(1),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(3), I8(0),
|
|
B(LdaSmi), I8(45),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(1),
|
|
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),
|
|
/* 17 E> */ B(StackCheck),
|
|
B(Mov), R(context), R(4),
|
|
B(Mov), R(context), R(5),
|
|
B(Ldar), R(0),
|
|
/* 17 E> */ B(SuspendGenerator), R(0), R(0), U8(6), U8(0),
|
|
/* 31 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(6),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(1),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0),
|
|
B(Ldar), R(6),
|
|
/* 17 E> */ B(Throw),
|
|
B(LdaZero),
|
|
B(Star), R(2),
|
|
B(Mov), R(6), R(3),
|
|
B(Jump), U8(160),
|
|
/* 22 S> */ B(LdaSmi), I8(42),
|
|
B(Star), R(7),
|
|
B(LdaFalse),
|
|
B(Star), R(8),
|
|
B(Mov), R(0), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorYield), R(6), U8(3),
|
|
B(SuspendGenerator), R(0), R(0), U8(6), U8(1),
|
|
/* 31 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(6),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(1),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(5), U8(2), I8(0),
|
|
B(Ldar), R(6),
|
|
/* 22 E> */ B(Throw),
|
|
B(LdaZero),
|
|
B(Star), R(2),
|
|
B(Mov), R(6), R(3),
|
|
B(Jump), U8(107),
|
|
B(LdaUndefined),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(6),
|
|
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(6), U8(2),
|
|
B(SuspendGenerator), R(0), R(0), U8(6), U8(2),
|
|
/* 31 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(6),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(1),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(7),
|
|
B(LdaZero),
|
|
B(TestEqualStrictNoFeedback), R(7),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(6),
|
|
B(ReThrow),
|
|
B(LdaZero),
|
|
B(Star), R(2),
|
|
B(Mov), R(6), R(3),
|
|
B(Jump), U8(55),
|
|
B(Jump), U8(39),
|
|
B(Star), R(6),
|
|
B(Ldar), R(closure),
|
|
B(CreateCatchContext), R(6), U8(7), U8(8),
|
|
B(Star), R(5),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(5),
|
|
B(PushContext), R(6),
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
|
B(Star), R(8),
|
|
B(Mov), R(0), R(7),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorReject), R(7), U8(2),
|
|
B(PopContext), R(6),
|
|
B(Star), R(3),
|
|
B(LdaSmi), I8(1),
|
|
B(Star), R(2),
|
|
B(Jump), U8(16),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(3),
|
|
B(Star), R(2),
|
|
B(Jump), U8(8),
|
|
B(Star), R(3),
|
|
B(LdaSmi), I8(2),
|
|
B(Star), R(2),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(0), U8(1),
|
|
B(Ldar), R(4),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(2),
|
|
B(SwitchOnSmiNoFeedback), U8(9), U8(3), I8(0),
|
|
B(Jump), U8(22),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(5),
|
|
B(Mov), R(3), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorResolve), R(5), U8(3),
|
|
/* 31 S> */ B(Return),
|
|
B(Ldar), R(3),
|
|
/* 31 S> */ B(Return),
|
|
B(Ldar), R(3),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
/* 31 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [44],
|
|
Smi [97],
|
|
Smi [146],
|
|
Smi [15],
|
|
Smi [7],
|
|
Smi [15],
|
|
Smi [7],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [6],
|
|
Smi [20],
|
|
Smi [23],
|
|
]
|
|
handlers: [
|
|
[47, 235, 243],
|
|
[50, 196, 198],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
async function* f() { for (let x of [42]) yield x }
|
|
f();
|
|
"
|
|
frame size: 22
|
|
parameter count: 1
|
|
bytecode array length: 585
|
|
bytecodes: [
|
|
B(Ldar), R(2),
|
|
B(JumpIfUndefined), U8(25),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(2), U8(1),
|
|
B(PushContext), R(11),
|
|
B(RestoreGeneratorState), R(2),
|
|
B(Star), R(10),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(3), I8(0),
|
|
B(LdaSmi), I8(45),
|
|
B(Star), R(11),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(11), U8(1),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(10),
|
|
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(2),
|
|
/* 17 E> */ B(StackCheck),
|
|
B(Mov), R(context), R(13),
|
|
B(Mov), R(context), R(14),
|
|
B(Ldar), R(2),
|
|
/* 17 E> */ B(SuspendGenerator), R(2), R(0), U8(15), U8(0),
|
|
/* 50 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(2), R(0), U8(15),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(10),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
|
|
B(Star), R(15),
|
|
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),
|
|
B(LdaZero),
|
|
B(Star), R(11),
|
|
B(Mov), R(15), R(12),
|
|
B(JumpConstant), U8(21),
|
|
B(LdaZero),
|
|
B(Star), R(6),
|
|
B(Mov), R(context), R(17),
|
|
B(Mov), R(context), R(18),
|
|
/* 36 S> */ B(CreateArrayLiteral), U8(5), U8(0), U8(37),
|
|
B(Star), R(19),
|
|
B(LdaNamedProperty), R(19), U8(6), U8(1),
|
|
B(Star), R(20),
|
|
B(CallProperty0), R(20), R(19), U8(3),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
|
B(Star), R(4),
|
|
B(Ldar), R(10),
|
|
B(SwitchOnSmiNoFeedback), U8(7), U8(1), I8(1),
|
|
B(LdaSmi), I8(-2),
|
|
/* 36 E> */ B(TestEqualStrictNoFeedback), R(10),
|
|
B(JumpIfTrue), U8(11),
|
|
B(LdaSmi), I8(45),
|
|
B(Star), R(19),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(19), U8(1),
|
|
/* 31 S> */ B(LdaNamedProperty), R(4), U8(8), U8(7),
|
|
B(Star), R(19),
|
|
B(CallProperty0), R(19), R(4), U8(5),
|
|
B(Star), R(5),
|
|
/* 31 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(5), U8(1),
|
|
B(ToBooleanLogicalNot),
|
|
B(JumpIfFalse), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
|
|
B(LdaNamedProperty), R(5), U8(9), U8(9),
|
|
B(JumpIfToBooleanTrue), U8(77),
|
|
B(LdaNamedProperty), R(5), U8(10), U8(11),
|
|
B(Star), R(7),
|
|
B(LdaSmi), I8(2),
|
|
B(Star), R(6),
|
|
B(Mov), R(7), R(3),
|
|
/* 22 E> */ B(StackCheck),
|
|
B(Mov), R(3), R(0),
|
|
/* 42 S> */ B(LdaFalse),
|
|
B(Star), R(21),
|
|
B(Mov), R(2), R(19),
|
|
B(Mov), R(0), R(20),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorYield), R(19), U8(3),
|
|
B(SuspendGenerator), R(2), R(0), U8(19), U8(1),
|
|
/* 50 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(2), R(0), U8(19),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(10),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
|
|
B(Star), R(19),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(11), U8(2), I8(0),
|
|
B(Ldar), R(19),
|
|
/* 42 E> */ B(Throw),
|
|
B(LdaZero),
|
|
B(Star), R(15),
|
|
B(Mov), R(19), R(16),
|
|
B(Jump), U8(62),
|
|
B(LdaZero),
|
|
B(Star), R(6),
|
|
B(JumpLoop), U8(123), I8(0),
|
|
B(Jump), U8(40),
|
|
B(Star), R(19),
|
|
B(Ldar), R(closure),
|
|
B(CreateCatchContext), R(19), U8(13), U8(14),
|
|
B(Star), R(18),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(18),
|
|
B(PushContext), R(19),
|
|
B(LdaSmi), I8(2),
|
|
B(TestEqualStrict), R(6), U8(13),
|
|
B(JumpIfFalse), U8(6),
|
|
B(LdaSmi), I8(1),
|
|
B(Star), R(6),
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
|
B(Star), R(20),
|
|
B(CallRuntime), U16(Runtime::kReThrow), R(20), U8(1),
|
|
B(PopContext), R(19),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(16),
|
|
B(Star), R(15),
|
|
B(Jump), U8(8),
|
|
B(Star), R(16),
|
|
B(LdaSmi), I8(1),
|
|
B(Star), R(15),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star), R(17),
|
|
B(LdaZero),
|
|
B(TestEqualStrict), R(6), U8(14),
|
|
B(JumpIfTrue), U8(104),
|
|
B(LdaNamedProperty), R(4), U8(15), U8(15),
|
|
B(Star), R(8),
|
|
B(TestUndetectable),
|
|
B(JumpIfFalse), U8(4),
|
|
B(Jump), U8(93),
|
|
B(LdaSmi), I8(1),
|
|
B(TestEqualStrict), R(6), U8(18),
|
|
B(JumpIfFalse), U8(61),
|
|
B(Ldar), R(8),
|
|
B(TestTypeOf), U8(5),
|
|
B(JumpIfFalse), U8(4),
|
|
B(Jump), U8(18),
|
|
B(Wide), B(LdaSmi), I16(134),
|
|
B(Star), R(18),
|
|
B(LdaConstant), U8(16),
|
|
B(Star), R(19),
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(18), U8(2),
|
|
B(Throw),
|
|
B(Mov), R(context), R(18),
|
|
B(Mov), R(8), R(19),
|
|
B(Mov), R(4), R(20),
|
|
B(InvokeIntrinsic), U8(Runtime::k_Call), R(19), U8(2),
|
|
B(Jump), U8(20),
|
|
B(Star), R(19),
|
|
B(Ldar), R(closure),
|
|
B(CreateCatchContext), R(19), U8(13), U8(17),
|
|
B(Star), R(18),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(18),
|
|
B(PushContext), R(19),
|
|
B(PopContext), R(19),
|
|
B(Jump), U8(27),
|
|
B(Mov), R(8), R(18),
|
|
B(Mov), R(4), R(19),
|
|
B(InvokeIntrinsic), U8(Runtime::k_Call), R(18), U8(2),
|
|
B(Star), R(9),
|
|
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
|
|
B(JumpIfToBooleanFalse), U8(4),
|
|
B(Jump), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
|
|
B(Ldar), R(17),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(15),
|
|
B(SwitchOnSmiNoFeedback), U8(18), U8(2), I8(0),
|
|
B(Jump), U8(13),
|
|
B(LdaZero),
|
|
B(Star), R(11),
|
|
B(Mov), R(16), R(12),
|
|
B(Jump), U8(110),
|
|
B(Ldar), R(16),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
B(Star), R(16),
|
|
B(Mov), R(2), R(15),
|
|
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(15), U8(2),
|
|
B(SuspendGenerator), R(2), R(0), U8(15), U8(2),
|
|
/* 50 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(2), R(0), U8(15),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(10),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(2), U8(1),
|
|
B(Star), R(15),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
|
|
B(Star), R(16),
|
|
B(LdaZero),
|
|
B(TestEqualStrictNoFeedback), R(16),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(15),
|
|
B(ReThrow),
|
|
B(LdaZero),
|
|
B(Star), R(11),
|
|
B(Mov), R(15), R(12),
|
|
B(Jump), U8(55),
|
|
B(Jump), U8(39),
|
|
B(Star), R(15),
|
|
B(Ldar), R(closure),
|
|
B(CreateCatchContext), R(15), U8(13), U8(20),
|
|
B(Star), R(14),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(14),
|
|
B(PushContext), R(15),
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
|
B(Star), R(17),
|
|
B(Mov), R(2), R(16),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorReject), R(16), U8(2),
|
|
B(PopContext), R(15),
|
|
B(Star), R(12),
|
|
B(LdaSmi), I8(1),
|
|
B(Star), R(11),
|
|
B(Jump), U8(16),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(12),
|
|
B(Star), R(11),
|
|
B(Jump), U8(8),
|
|
B(Star), R(12),
|
|
B(LdaSmi), I8(2),
|
|
B(Star), R(11),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star), R(13),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(2), U8(1),
|
|
B(Ldar), R(13),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(11),
|
|
B(SwitchOnSmiNoFeedback), U8(22), U8(3), I8(0),
|
|
B(Jump), U8(22),
|
|
B(LdaTrue),
|
|
B(Star), R(16),
|
|
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),
|
|
B(Ldar), R(12),
|
|
/* 50 S> */ B(Return),
|
|
B(Ldar), R(12),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
/* 50 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [44],
|
|
Smi [111],
|
|
Smi [441],
|
|
Smi [15],
|
|
Smi [7],
|
|
TUPLE2_TYPE,
|
|
SYMBOL_TYPE,
|
|
Smi [85],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
Smi [15],
|
|
Smi [7],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
|
|
FIXED_ARRAY_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [6],
|
|
Smi [14],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [455],
|
|
Smi [6],
|
|
Smi [20],
|
|
Smi [23],
|
|
]
|
|
handlers: [
|
|
[47, 530, 538],
|
|
[50, 491, 493],
|
|
[97, 291, 299],
|
|
[100, 251, 253],
|
|
[360, 370, 372],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
function* g() { yield 42 }
|
|
async function* f() { yield* g() }
|
|
f();
|
|
"
|
|
frame size: 17
|
|
parameter count: 1
|
|
bytecode array length: 577
|
|
bytecodes: [
|
|
B(Ldar), R(0),
|
|
B(JumpIfUndefined), U8(25),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(0), U8(1),
|
|
B(PushContext), R(2),
|
|
B(RestoreGeneratorState), R(0),
|
|
B(Star), R(1),
|
|
B(SwitchOnSmiNoFeedback), U8(0), U8(5), I8(0),
|
|
B(LdaSmi), I8(45),
|
|
B(Star), R(2),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(1),
|
|
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),
|
|
/* 44 E> */ B(StackCheck),
|
|
B(Mov), R(context), R(4),
|
|
B(Mov), R(context), R(5),
|
|
B(Ldar), R(0),
|
|
/* 44 E> */ B(SuspendGenerator), R(0), R(0), U8(6), U8(0),
|
|
/* 60 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(6),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(1),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(5), U8(2), I8(0),
|
|
B(Ldar), R(6),
|
|
/* 44 E> */ B(Throw),
|
|
B(LdaZero),
|
|
B(Star), R(2),
|
|
B(Mov), R(6), R(3),
|
|
B(JumpConstant), U8(22),
|
|
/* 49 S> */ B(LdaGlobal), U8(7), U8(2),
|
|
B(Star), R(12),
|
|
/* 56 E> */ B(CallUndefinedReceiver0), R(12), U8(0),
|
|
B(Star), R(10),
|
|
B(LdaNamedProperty), R(10), U8(8), U8(26),
|
|
B(JumpIfUndefined), U8(17),
|
|
B(JumpIfNull), U8(15),
|
|
B(Star), R(11),
|
|
B(CallProperty0), R(11), R(10), U8(28),
|
|
B(JumpIfJSReceiver), U8(23),
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolAsyncIteratorInvalid), R(0), U8(0),
|
|
B(LdaNamedProperty), R(10), U8(9), U8(4),
|
|
B(Star), R(11),
|
|
B(CallProperty0), R(11), R(10), U8(16),
|
|
B(Star), R(11),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(11), U8(1),
|
|
B(Star), R(8),
|
|
B(LdaUndefined),
|
|
B(Star), R(9),
|
|
B(LdaZero),
|
|
B(Star), R(7),
|
|
B(Ldar), R(1),
|
|
B(SwitchOnSmiNoFeedback), U8(10), U8(3), I8(1),
|
|
B(LdaSmi), I8(-2),
|
|
B(TestEqualStrictNoFeedback), R(1),
|
|
B(JumpIfTrue), U8(11),
|
|
B(LdaSmi), I8(45),
|
|
B(Star), R(12),
|
|
B(CallRuntime), U16(Runtime::kAbort), R(12), U8(1),
|
|
B(Ldar), R(7),
|
|
B(SwitchOnSmiNoFeedback), U8(13), U8(2), I8(1),
|
|
B(LdaNamedProperty), R(8), U8(15), U8(8),
|
|
B(Star), R(12),
|
|
B(CallProperty1), R(12), R(8), R(9), U8(22),
|
|
B(Jump), U8(118),
|
|
B(LdaNamedProperty), R(8), U8(16), U8(6),
|
|
B(JumpIfUndefined), U8(13),
|
|
B(JumpIfNull), U8(11),
|
|
B(Star), R(12),
|
|
B(CallProperty1), R(12), R(8), R(9), U8(18),
|
|
B(Jump), U8(101),
|
|
B(LdaZero),
|
|
B(Star), R(2),
|
|
B(Mov), R(9), R(3),
|
|
B(JumpConstant), U8(23),
|
|
B(LdaNamedProperty), R(8), U8(17), U8(10),
|
|
B(JumpIfUndefined), U8(13),
|
|
B(JumpIfNull), U8(11),
|
|
B(Star), R(12),
|
|
B(CallProperty1), R(12), R(8), R(9), U8(24),
|
|
B(Jump), U8(76),
|
|
B(LdaNamedProperty), R(8), U8(16), U8(6),
|
|
B(Star), R(12),
|
|
B(JumpIfUndefined), U8(63),
|
|
B(JumpIfNull), U8(61),
|
|
B(CallProperty0), R(12), R(8), U8(20),
|
|
B(Star), R(14),
|
|
B(Mov), R(0), R(13),
|
|
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(13), U8(2),
|
|
B(SuspendGenerator), R(0), R(0), U8(13), U8(2),
|
|
/* 60 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(13),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(1),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(13),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(14),
|
|
B(LdaZero),
|
|
B(TestEqualStrictNoFeedback), R(14),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(13),
|
|
B(ReThrow),
|
|
B(Ldar), R(13),
|
|
B(Mov), R(13), R(6),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
|
|
B(CallRuntime), U16(Runtime::kThrowThrowMethodMissing), R(0), U8(0),
|
|
B(Star), R(13),
|
|
B(Mov), R(0), R(12),
|
|
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(12), U8(2),
|
|
B(SuspendGenerator), R(0), R(0), U8(12), U8(3),
|
|
/* 60 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(12),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(1),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(12),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(13),
|
|
B(LdaZero),
|
|
B(TestEqualStrictNoFeedback), R(13),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(12),
|
|
B(ReThrow),
|
|
B(Ldar), R(12),
|
|
B(Mov), R(12), R(6),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
|
|
B(LdaNamedProperty), R(6), U8(18), U8(12),
|
|
B(JumpIfToBooleanTrue), U8(50),
|
|
B(LdaNamedProperty), R(6), U8(19), U8(14),
|
|
B(Star), R(15),
|
|
B(LdaFalse),
|
|
B(Star), R(16),
|
|
B(Mov), R(0), R(14),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorYield), R(14), U8(3),
|
|
B(SuspendGenerator), R(0), R(0), U8(14), U8(1),
|
|
/* 60 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(14),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(1),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(9),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(7),
|
|
B(Wide), B(JumpLoop), U16(260), I16(0),
|
|
B(LdaNamedProperty), R(6), U8(19), U8(14),
|
|
B(Star), R(8),
|
|
B(LdaSmi), I8(1),
|
|
B(TestEqualStrictNoFeedback), R(7),
|
|
B(JumpIfFalse), U8(10),
|
|
B(LdaZero),
|
|
B(Star), R(2),
|
|
B(Mov), R(8), R(3),
|
|
B(Jump), U8(107),
|
|
B(LdaUndefined),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(6),
|
|
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(6), U8(2),
|
|
B(SuspendGenerator), R(0), R(0), U8(6), U8(4),
|
|
/* 60 S> */ B(Return),
|
|
B(RestoreGeneratorRegisters), R(0), R(0), U8(6),
|
|
B(LdaSmi), I8(-2),
|
|
B(Star), R(1),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(0), U8(1),
|
|
B(Star), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(7),
|
|
B(LdaZero),
|
|
B(TestEqualStrictNoFeedback), R(7),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(6),
|
|
B(ReThrow),
|
|
B(LdaZero),
|
|
B(Star), R(2),
|
|
B(Mov), R(6), R(3),
|
|
B(Jump), U8(55),
|
|
B(Jump), U8(39),
|
|
B(Star), R(6),
|
|
B(Ldar), R(closure),
|
|
B(CreateCatchContext), R(6), U8(20), U8(21),
|
|
B(Star), R(5),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(5),
|
|
B(PushContext), R(6),
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
|
B(Star), R(8),
|
|
B(Mov), R(0), R(7),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorReject), R(7), U8(2),
|
|
B(PopContext), R(6),
|
|
B(Star), R(3),
|
|
B(LdaSmi), I8(1),
|
|
B(Star), R(2),
|
|
B(Jump), U8(16),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(3),
|
|
B(Star), R(2),
|
|
B(Jump), U8(8),
|
|
B(Star), R(3),
|
|
B(LdaSmi), I8(2),
|
|
B(Star), R(2),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(0), U8(1),
|
|
B(Ldar), R(4),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(2),
|
|
B(SwitchOnSmiNoFeedback), U8(24), U8(3), I8(0),
|
|
B(Jump), U8(22),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(5),
|
|
B(Mov), R(3), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorResolve), R(5), U8(3),
|
|
/* 60 S> */ B(Return),
|
|
B(Ldar), R(3),
|
|
/* 60 S> */ B(Return),
|
|
B(Ldar), R(3),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
/* 60 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [44],
|
|
Smi [132],
|
|
Smi [132],
|
|
Smi [132],
|
|
Smi [433],
|
|
Smi [15],
|
|
Smi [7],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
|
|
SYMBOL_TYPE,
|
|
SYMBOL_TYPE,
|
|
Smi [237],
|
|
Smi [109],
|
|
Smi [169],
|
|
Smi [17],
|
|
Smi [42],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["throw"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
|
|
FIXED_ARRAY_TYPE,
|
|
Smi [447],
|
|
Smi [327],
|
|
Smi [6],
|
|
Smi [20],
|
|
Smi [23],
|
|
]
|
|
handlers: [
|
|
[47, 522, 530],
|
|
[50, 483, 485],
|
|
]
|
|
|