5f8a42727d
This is a reland of 1c48d52bb1
.
It turned out that IterableToList doesn't always behave according to
the ES operation with the same name. Specifically, it allows holey arrays
to take its fast path, which produces an output array with holes where
actually "undefined" elements should appear.
This CL changes the version of IterableToList that is used for spreads
(IterableToListWithSymbolLookup) such that holey arrays take the slow path.
It also includes tests for such situations.
Original change's description:
> [interpreter] Add bytecode for leading array spreads.
>
> This CL improves the performance of creating [...a, b] or [...a].
> If the array literal has a leading spread, this CL emits the bytecode
> [CreateArrayFromIterable] to create the literal. CreateArrayFromIterable
> is implemented by [IterableToListDefault] builtin to create the initial
> array for the leading spread. IterableToListDefault has a fast path to
> clone efficiently if the spread is an actual array.
>
> The bytecode generated is now shorter. Bytecode generation is refactored
> into to BuildCreateArrayLiteral, which allows VisitCallSuper to benefit
> from this optimization also.
> For now, turbofan also lowers the bytecode to the builtin.
>
> The idiomatic use of [...a] to clone the array a now performs better
> than a simple for-loop, but still does not match the performance of slice.
>
> Bug: v8:7980
>
> Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
> Change-Id: Ibde659c82d3c7aa1b1777a3d2f6426ac8cc15e35
> Reviewed-on: https://chromium-review.googlesource.com/1181024
> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
> Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Commit-Queue: Hai Dang <dhai@google.com>
> Cr-Commit-Position: refs/heads/master@{#55520}
Bug: v8:7980
Change-Id: I0b5603a12d2b588327658bf0a9b214bd0f22e237
Cq-Include-Trybots: luci.v8.try:v8_linux_noi18n_rel_ng
Reviewed-on: https://chromium-review.googlesource.com/1201882
Commit-Queue: Hai Dang <dhai@google.com>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55639}
726 lines
26 KiB
Plaintext
726 lines
26 KiB
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
wrap: no
|
|
test function name: f
|
|
async iteration: yes
|
|
|
|
---
|
|
snippet: "
|
|
async function* f() { }
|
|
f();
|
|
"
|
|
frame size: 8
|
|
parameter count: 1
|
|
bytecode array length: 189
|
|
bytecodes: [
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
|
B(Mov), R(closure), R(1),
|
|
B(Mov), R(this), R(2),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
|
|
B(Star), R(0),
|
|
/* 17 E> */ B(StackCheck),
|
|
B(Mov), R(context), R(3),
|
|
B(Mov), R(context), R(4),
|
|
B(Ldar), R(0),
|
|
/* 17 E> */ B(SuspendGenerator), R(0), R(0), U8(5), U8(0),
|
|
B(ResumeGenerator), R(0), R(0), U8(5),
|
|
B(Star), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
|
B(Ldar), R(5),
|
|
/* 17 E> */ B(Throw),
|
|
B(LdaZero),
|
|
B(Star), R(1),
|
|
B(Mov), R(5), R(2),
|
|
B(Jump), U8(95),
|
|
B(LdaUndefined),
|
|
B(Star), R(6),
|
|
B(Mov), R(0), R(5),
|
|
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(5), U8(2),
|
|
B(SuspendGenerator), R(0), R(0), U8(5), U8(1),
|
|
B(ResumeGenerator), R(0), R(0), U8(5),
|
|
B(Star), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(6),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(6),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(5),
|
|
B(ReThrow),
|
|
B(LdaZero),
|
|
B(Star), R(1),
|
|
B(Mov), R(5), R(2),
|
|
B(Jump), U8(52),
|
|
B(Jump), U8(36),
|
|
B(Star), R(5),
|
|
B(CreateCatchContext), R(5), U8(4),
|
|
B(Star), R(4),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(4),
|
|
B(PushContext), R(5),
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorReject), R(6), U8(2),
|
|
B(PopContext), R(5),
|
|
B(Star), R(2),
|
|
B(LdaSmi), I8(1),
|
|
B(Star), R(1),
|
|
B(Jump), U8(16),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(2),
|
|
B(Star), R(1),
|
|
B(Jump), U8(8),
|
|
B(Star), R(2),
|
|
B(LdaSmi), I8(2),
|
|
B(Star), R(1),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star), R(3),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(0), U8(1),
|
|
B(Ldar), R(3),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(1),
|
|
B(SwitchOnSmiNoFeedback), U8(5), U8(3), I8(0),
|
|
B(Jump), U8(22),
|
|
B(LdaTrue),
|
|
B(Star), R(6),
|
|
B(Mov), R(0), R(4),
|
|
B(Mov), R(2), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorResolve), R(4), U8(3),
|
|
/* 22 S> */ B(Return),
|
|
B(Ldar), R(2),
|
|
/* 22 S> */ B(Return),
|
|
B(Ldar), R(2),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
/* 22 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [30],
|
|
Smi [70],
|
|
Smi [15],
|
|
Smi [7],
|
|
SCOPE_INFO_TYPE,
|
|
Smi [6],
|
|
Smi [20],
|
|
Smi [23],
|
|
]
|
|
handlers: [
|
|
[20, 134, 142],
|
|
[23, 98, 100],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
async function* f() { yield 42 }
|
|
f();
|
|
"
|
|
frame size: 8
|
|
parameter count: 1
|
|
bytecode array length: 233
|
|
bytecodes: [
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(3),
|
|
B(Mov), R(closure), R(1),
|
|
B(Mov), R(this), R(2),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
|
|
B(Star), R(0),
|
|
/* 17 E> */ B(StackCheck),
|
|
B(Mov), R(context), R(3),
|
|
B(Mov), R(context), R(4),
|
|
B(Ldar), R(0),
|
|
/* 17 E> */ B(SuspendGenerator), R(0), R(0), U8(5), U8(0),
|
|
B(ResumeGenerator), R(0), R(0), U8(5),
|
|
B(Star), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(3), U8(2), I8(0),
|
|
B(Ldar), R(5),
|
|
/* 17 E> */ B(Throw),
|
|
B(LdaZero),
|
|
B(Star), R(1),
|
|
B(Mov), R(5), R(2),
|
|
B(Jump), U8(139),
|
|
/* 22 S> */ B(LdaSmi), I8(42),
|
|
B(Star), R(6),
|
|
B(LdaFalse),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorYield), R(5), U8(3),
|
|
/* 22 E> */ B(SuspendGenerator), R(0), R(0), U8(5), U8(1),
|
|
B(ResumeGenerator), R(0), R(0), U8(5),
|
|
B(Star), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(5), U8(2), I8(0),
|
|
B(Ldar), R(5),
|
|
/* 22 E> */ B(Throw),
|
|
B(LdaZero),
|
|
B(Star), R(1),
|
|
B(Mov), R(5), R(2),
|
|
B(Jump), U8(95),
|
|
B(LdaUndefined),
|
|
B(Star), R(6),
|
|
B(Mov), R(0), R(5),
|
|
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(5), U8(2),
|
|
B(SuspendGenerator), R(0), R(0), U8(5), U8(2),
|
|
B(ResumeGenerator), R(0), R(0), U8(5),
|
|
B(Star), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(6),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(6),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(5),
|
|
B(ReThrow),
|
|
B(LdaZero),
|
|
B(Star), R(1),
|
|
B(Mov), R(5), R(2),
|
|
B(Jump), U8(52),
|
|
B(Jump), U8(36),
|
|
B(Star), R(5),
|
|
B(CreateCatchContext), R(5), U8(7),
|
|
B(Star), R(4),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(4),
|
|
B(PushContext), R(5),
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorReject), R(6), U8(2),
|
|
B(PopContext), R(5),
|
|
B(Star), R(2),
|
|
B(LdaSmi), I8(1),
|
|
B(Star), R(1),
|
|
B(Jump), U8(16),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(2),
|
|
B(Star), R(1),
|
|
B(Jump), U8(8),
|
|
B(Star), R(2),
|
|
B(LdaSmi), I8(2),
|
|
B(Star), R(1),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star), R(3),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(0), U8(1),
|
|
B(Ldar), R(3),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(1),
|
|
B(SwitchOnSmiNoFeedback), U8(8), U8(3), I8(0),
|
|
B(Jump), U8(22),
|
|
B(LdaTrue),
|
|
B(Star), R(6),
|
|
B(Mov), R(0), R(4),
|
|
B(Mov), R(2), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorResolve), R(4), U8(3),
|
|
/* 31 S> */ B(Return),
|
|
B(Ldar), R(2),
|
|
/* 31 S> */ B(Return),
|
|
B(Ldar), R(2),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
/* 31 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [30],
|
|
Smi [74],
|
|
Smi [114],
|
|
Smi [15],
|
|
Smi [7],
|
|
Smi [15],
|
|
Smi [7],
|
|
SCOPE_INFO_TYPE,
|
|
Smi [6],
|
|
Smi [20],
|
|
Smi [23],
|
|
]
|
|
handlers: [
|
|
[20, 178, 186],
|
|
[23, 142, 144],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
async function* f() { for (let x of [42]) yield x }
|
|
f();
|
|
"
|
|
frame size: 22
|
|
parameter count: 1
|
|
bytecode array length: 490
|
|
bytecodes: [
|
|
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(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),
|
|
B(ResumeGenerator), R(2), R(0), U8(15),
|
|
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(18),
|
|
B(LdaZero),
|
|
B(Star), R(7),
|
|
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),
|
|
/* 36 E> */ B(LdaNamedProperty), R(4), U8(7), U8(5),
|
|
B(Star), R(5),
|
|
/* 31 S> */ B(CallProperty0), R(5), R(4), U8(7),
|
|
B(Star), R(6),
|
|
/* 31 E> */ B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(6), U8(1),
|
|
B(ToBooleanLogicalNot),
|
|
B(JumpIfFalse), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(6), U8(1),
|
|
B(LdaNamedProperty), R(6), U8(8), U8(9),
|
|
B(JumpIfToBooleanTrue), U8(68),
|
|
B(LdaNamedProperty), R(6), U8(9), U8(11),
|
|
B(Star), R(8),
|
|
B(LdaSmi), I8(2),
|
|
B(Star), R(7),
|
|
B(Mov), R(8), 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),
|
|
/* 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(2), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(10), 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(59),
|
|
B(LdaZero),
|
|
B(Star), R(7),
|
|
B(JumpLoop), U8(87), I8(0),
|
|
B(Jump), U8(37),
|
|
B(Star), R(19),
|
|
B(CreateCatchContext), R(19), U8(12),
|
|
B(Star), R(18),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(18),
|
|
B(PushContext), R(19),
|
|
B(LdaSmi), I8(2),
|
|
B(TestEqualStrict), R(7), U8(13),
|
|
B(JumpIfFalse), U8(6),
|
|
B(LdaSmi), I8(1),
|
|
B(Star), R(7),
|
|
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(7), U8(14),
|
|
B(JumpIfTrue), U8(90),
|
|
B(LdaNamedProperty), R(4), U8(13), U8(15),
|
|
B(Star), R(9),
|
|
B(TestUndetectable),
|
|
B(JumpIfFalse), U8(4),
|
|
B(Jump), U8(79),
|
|
B(LdaSmi), I8(1),
|
|
B(TestEqualStrict), R(7), U8(17),
|
|
B(JumpIfFalse), U8(47),
|
|
B(Ldar), R(9),
|
|
B(TestTypeOf), U8(6),
|
|
B(JumpIfFalse), U8(4),
|
|
B(Jump), U8(18),
|
|
B(Wide), B(LdaSmi), I16(154),
|
|
B(Star), R(18),
|
|
B(LdaConstant), U8(14),
|
|
B(Star), R(19),
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(18), U8(2),
|
|
B(Throw),
|
|
B(Mov), R(context), R(18),
|
|
B(Mov), R(9), R(19),
|
|
B(Mov), R(4), R(20),
|
|
B(InvokeIntrinsic), U8(Runtime::k_Call), R(19), U8(2),
|
|
B(Jump), U8(6),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(18),
|
|
B(Jump), U8(27),
|
|
B(Mov), R(9), R(18),
|
|
B(Mov), R(4), R(19),
|
|
B(InvokeIntrinsic), U8(Runtime::k_Call), R(18), U8(2),
|
|
B(Star), R(10),
|
|
B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(10), U8(1),
|
|
B(JumpIfToBooleanFalse), U8(4),
|
|
B(Jump), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
|
|
B(Ldar), R(17),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(15),
|
|
B(SwitchOnSmiNoFeedback), U8(15), U8(2), I8(0),
|
|
B(Jump), U8(13),
|
|
B(LdaZero),
|
|
B(Star), R(11),
|
|
B(Mov), R(16), R(12),
|
|
B(Jump), U8(98),
|
|
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),
|
|
B(ResumeGenerator), R(2), R(0), U8(15),
|
|
B(Star), R(15),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(2), U8(1),
|
|
B(Star), R(16),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), 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(52),
|
|
B(Jump), U8(36),
|
|
B(Star), R(15),
|
|
B(CreateCatchContext), R(15), U8(17),
|
|
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(19), 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 [30],
|
|
Smi [154],
|
|
Smi [371],
|
|
Smi [15],
|
|
Smi [7],
|
|
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
|
SYMBOL_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
Smi [15],
|
|
Smi [7],
|
|
SCOPE_INFO_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
|
Smi [6],
|
|
Smi [14],
|
|
SCOPE_INFO_TYPE,
|
|
Smi [396],
|
|
Smi [6],
|
|
Smi [20],
|
|
Smi [23],
|
|
]
|
|
handlers: [
|
|
[20, 435, 443],
|
|
[23, 399, 401],
|
|
[61, 222, 230],
|
|
[64, 185, 187],
|
|
[291, 301, 303],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
function* g() { yield 42 }
|
|
async function* f() { yield* g() }
|
|
f();
|
|
"
|
|
frame size: 17
|
|
parameter count: 1
|
|
bytecode array length: 479
|
|
bytecodes: [
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(5),
|
|
B(Mov), R(closure), R(1),
|
|
B(Mov), R(this), R(2),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(1), U8(2),
|
|
B(Star), R(0),
|
|
/* 44 E> */ B(StackCheck),
|
|
B(Mov), R(context), R(3),
|
|
B(Mov), R(context), R(4),
|
|
B(Ldar), R(0),
|
|
/* 44 E> */ B(SuspendGenerator), R(0), R(0), U8(5), U8(0),
|
|
B(ResumeGenerator), R(0), R(0), U8(5),
|
|
B(Star), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(5), U8(2), I8(0),
|
|
B(Ldar), R(5),
|
|
/* 44 E> */ B(Throw),
|
|
B(LdaZero),
|
|
B(Star), R(1),
|
|
B(Mov), R(5), R(2),
|
|
B(JumpConstant), U8(18),
|
|
/* 49 S> */ B(LdaGlobal), U8(7), U8(0),
|
|
B(Star), R(12),
|
|
/* 56 E> */ B(CallUndefinedReceiver0), R(12), U8(2),
|
|
B(Star), R(10),
|
|
B(LdaNamedProperty), R(10), U8(8), U8(4),
|
|
B(JumpIfUndefined), U8(17),
|
|
B(JumpIfNull), U8(15),
|
|
B(Star), R(11),
|
|
B(CallProperty0), R(11), R(10), U8(6),
|
|
B(JumpIfJSReceiver), U8(23),
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolAsyncIteratorInvalid), R(0), U8(0),
|
|
B(LdaNamedProperty), R(10), U8(9), U8(8),
|
|
B(Star), R(11),
|
|
B(CallProperty0), R(11), R(10), U8(10),
|
|
B(Star), R(11),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateAsyncFromSyncIterator), R(11), U8(1),
|
|
B(Star), R(7),
|
|
B(LdaNamedProperty), R(7), U8(10), U8(12),
|
|
B(Star), R(9),
|
|
B(LdaUndefined),
|
|
B(Star), R(8),
|
|
B(LdaZero),
|
|
B(Star), R(6),
|
|
B(Ldar), R(6),
|
|
B(SwitchOnSmiNoFeedback), U8(11), U8(2), I8(1),
|
|
B(CallProperty1), R(9), R(7), R(8), U8(14),
|
|
B(Jump), U8(110),
|
|
B(LdaNamedProperty), R(7), U8(13), U8(16),
|
|
B(JumpIfUndefined), U8(13),
|
|
B(JumpIfNull), U8(11),
|
|
B(Star), R(12),
|
|
B(CallProperty1), R(12), R(7), R(8), U8(18),
|
|
B(Jump), U8(93),
|
|
B(LdaZero),
|
|
B(Star), R(1),
|
|
B(Mov), R(8), R(2),
|
|
B(JumpConstant), U8(19),
|
|
B(LdaNamedProperty), R(7), U8(14), U8(20),
|
|
B(JumpIfUndefined), U8(13),
|
|
B(JumpIfNull), U8(11),
|
|
B(Star), R(12),
|
|
B(CallProperty1), R(12), R(7), R(8), U8(22),
|
|
B(Jump), U8(68),
|
|
B(LdaNamedProperty), R(7), U8(13), U8(24),
|
|
B(JumpIfUndefined), U8(57),
|
|
B(JumpIfNull), U8(55),
|
|
B(Star), R(12),
|
|
B(CallProperty0), R(12), R(7), U8(26),
|
|
B(Jump), U8(2),
|
|
B(Star), R(13),
|
|
B(Mov), R(0), R(12),
|
|
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(12), U8(2),
|
|
/* 49 E> */ B(SuspendGenerator), R(0), R(0), U8(12), U8(1),
|
|
B(ResumeGenerator), R(0), R(0), U8(12),
|
|
B(Star), R(12),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(13),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(13),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(12),
|
|
B(ReThrow),
|
|
B(Ldar), R(12),
|
|
B(JumpIfJSReceiver), U8(9),
|
|
B(Star), R(14),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), 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),
|
|
/* 49 E> */ B(SuspendGenerator), R(0), R(0), U8(12), U8(2),
|
|
B(ResumeGenerator), R(0), R(0), U8(12),
|
|
B(Star), R(12),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(13),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(13),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(12),
|
|
B(ReThrow),
|
|
B(Ldar), R(12),
|
|
B(Mov), R(12), R(5),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(5), U8(1),
|
|
B(LdaNamedProperty), R(5), U8(15), U8(28),
|
|
B(JumpIfToBooleanTrue), U8(38),
|
|
B(LdaNamedProperty), R(5), U8(16), U8(30),
|
|
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),
|
|
/* 49 E> */ B(SuspendGenerator), R(0), R(0), U8(14), U8(3),
|
|
B(ResumeGenerator), R(0), R(0), U8(14),
|
|
B(Star), R(8),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(6),
|
|
B(JumpLoop), U8(206), I8(0),
|
|
B(LdaNamedProperty), R(5), U8(16), U8(32),
|
|
B(Star), R(7),
|
|
B(LdaSmi), I8(1),
|
|
B(TestReferenceEqual), R(6),
|
|
B(JumpIfFalse), U8(10),
|
|
B(LdaZero),
|
|
B(Star), R(1),
|
|
B(Mov), R(7), R(2),
|
|
B(Jump), U8(95),
|
|
B(LdaUndefined),
|
|
B(Star), R(6),
|
|
B(Mov), R(0), R(5),
|
|
B(CallJSRuntime), U8(%async_generator_await_uncaught), R(5), U8(2),
|
|
B(SuspendGenerator), R(0), R(0), U8(5), U8(4),
|
|
B(ResumeGenerator), R(0), R(0), U8(5),
|
|
B(Star), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(Star), R(6),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(6),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(5),
|
|
B(ReThrow),
|
|
B(LdaZero),
|
|
B(Star), R(1),
|
|
B(Mov), R(5), R(2),
|
|
B(Jump), U8(52),
|
|
B(Jump), U8(36),
|
|
B(Star), R(5),
|
|
B(CreateCatchContext), R(5), U8(17),
|
|
B(Star), R(4),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(4),
|
|
B(PushContext), R(5),
|
|
B(LdaImmutableCurrentContextSlot), U8(4),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorReject), R(6), U8(2),
|
|
B(PopContext), R(5),
|
|
B(Star), R(2),
|
|
B(LdaSmi), I8(1),
|
|
B(Star), R(1),
|
|
B(Jump), U8(16),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(2),
|
|
B(Star), R(1),
|
|
B(Jump), U8(8),
|
|
B(Star), R(2),
|
|
B(LdaSmi), I8(2),
|
|
B(Star), R(1),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star), R(3),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(0), U8(1),
|
|
B(Ldar), R(3),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(1),
|
|
B(SwitchOnSmiNoFeedback), U8(20), U8(3), I8(0),
|
|
B(Jump), U8(22),
|
|
B(LdaTrue),
|
|
B(Star), R(6),
|
|
B(Mov), R(0), R(4),
|
|
B(Mov), R(2), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncGeneratorResolve), R(4), U8(3),
|
|
/* 60 S> */ B(Return),
|
|
B(Ldar), R(2),
|
|
/* 60 S> */ B(Return),
|
|
B(Ldar), R(2),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
/* 60 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [30],
|
|
Smi [201],
|
|
Smi [251],
|
|
Smi [310],
|
|
Smi [360],
|
|
Smi [15],
|
|
Smi [7],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["g"],
|
|
SYMBOL_TYPE,
|
|
SYMBOL_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
Smi [11],
|
|
Smi [36],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["throw"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
SCOPE_INFO_TYPE,
|
|
Smi [385],
|
|
Smi [286],
|
|
Smi [6],
|
|
Smi [20],
|
|
Smi [23],
|
|
]
|
|
handlers: [
|
|
[20, 424, 432],
|
|
[23, 388, 390],
|
|
]
|
|
|