ffa9f163e6
This is a reland of8b89a7c32d
Reland after disabling the test getting deadlocked with '--gc_stress' flag. The CL was reverted because of the 'wasm/grow-shared-memory' test from the mjsunit test suite deadlocked for the 'gc_stress' variant. This is the known issue (v8:9221) and the deadlocking test is now disabled (1c8981e3f4
). Original change's description: > Update GetIterator bytecode to load and call object[Symbol.iterator] > > The functionality of the GetIterator bytecode introduced previously is > now extended from loading the @@iterator property to calling the property > as well. This change basically absorbs the functionality of additional > two bytecodes - Star, CallProperty0 in the GetIterator bytecode. > Importantly, this change handles the cases of eager and lazy deoptimization > in the middle of the bytecode, i.e., lazy deopt for LdaNamedProperty and > eager deopt of the CallProperty0 bytecode, using the continuation builtins. > This mechanism can work as a template for the future bytecode that require > handling such inter-bytecode deopt scenario. The tests evaluating the eager > and lazy deopt scenarios are also included. > > Bug: v8:9489 > Change-Id: I93eb022bbc3d37582407820aa8482a343cac6c12 > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1758313 > Commit-Queue: Swapnil Gaikwad <swapnilgaikwad@google.com> > Reviewed-by: Leszek Swirski <leszeks@chromium.org> > Reviewed-by: Georg Neis <neis@chromium.org> > Reviewed-by: Tobias Tebbi <tebbi@chromium.org> > Cr-Commit-Position: refs/heads/master@{#63528} Bug: v8:9489,v8:9221 Change-Id: I4286255aef457bfdbbe5eb50fc6dabdf9c0955b1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1787427 Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Swapnil Gaikwad <swapnilgaikwad@google.com> Cr-Commit-Position: refs/heads/master@{#63599}
957 lines
33 KiB
Plaintext
957 lines
33 KiB
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
wrap: no
|
|
test function name: f
|
|
|
|
---
|
|
snippet: "
|
|
function f(arr) {
|
|
for (let x of arr) { let y = x; }
|
|
}
|
|
f([1, 2, 3]);
|
|
"
|
|
frame size: 15
|
|
parameter count: 2
|
|
bytecode array length: 162
|
|
bytecodes: [
|
|
/* 10 E> */ B(StackCheck),
|
|
/* 34 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
|
B(Star), R(5),
|
|
B(LdaNamedProperty), R(5), U8(0), U8(4),
|
|
B(Star), R(4),
|
|
B(LdaFalse),
|
|
B(Star), R(6),
|
|
B(Mov), R(context), R(9),
|
|
B(LdaTrue),
|
|
B(Star), R(6),
|
|
/* 29 S> */ B(CallProperty0), R(4), R(5), U8(6),
|
|
B(Star), R(10),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
|
|
B(LdaNamedProperty), R(10), U8(1), U8(8),
|
|
B(JumpIfToBooleanTrue), U8(26),
|
|
B(LdaNamedProperty), R(10), U8(2), U8(10),
|
|
B(Star), R(10),
|
|
B(LdaFalse),
|
|
B(Star), R(6),
|
|
B(Mov), R(10), R(0),
|
|
/* 20 E> */ B(StackCheck),
|
|
/* 29 S> */ B(Mov), R(0), R(2),
|
|
/* 49 S> */ B(Mov), R(2), R(3),
|
|
B(Ldar), R(10),
|
|
B(JumpLoop), U8(43), I8(0),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(8),
|
|
B(Star), R(7),
|
|
B(Jump), U8(7),
|
|
B(Star), R(8),
|
|
B(LdaZero),
|
|
B(Star), R(7),
|
|
B(LdaTheHole),
|
|
/* 49 E> */ B(SetPendingMessage),
|
|
B(Star), R(9),
|
|
B(Ldar), R(6),
|
|
B(JumpIfToBooleanTrue), U8(58),
|
|
B(LdaNamedProperty), R(5), U8(3), U8(12),
|
|
B(Star), R(11),
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
|
B(Mov), R(context), R(12),
|
|
B(TestTypeOf), U8(6),
|
|
B(JumpIfTrue), U8(18),
|
|
B(Wide), B(LdaSmi), I16(159),
|
|
B(Star), R(13),
|
|
B(LdaConstant), U8(4),
|
|
B(Star), R(14),
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(13), U8(2),
|
|
B(Throw),
|
|
B(CallProperty0), R(11), R(5), U8(14),
|
|
B(JumpIfJSReceiver), U8(21),
|
|
B(Star), R(13),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
|
|
B(Jump), U8(12),
|
|
B(Star), R(12),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(7),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(12),
|
|
B(ReThrow),
|
|
B(Ldar), R(9),
|
|
B(SetPendingMessage),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(7),
|
|
B(JumpIfFalse), U8(5),
|
|
B(Ldar), R(8),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
/* 54 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
|
]
|
|
handlers: [
|
|
[26, 72, 80],
|
|
[104, 137, 139],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
function f(arr) {
|
|
for (let x of arr) { eval('1'); }
|
|
}
|
|
f([1, 2, 3]);
|
|
"
|
|
frame size: 20
|
|
parameter count: 2
|
|
bytecode array length: 246
|
|
bytecodes: [
|
|
B(CreateFunctionContext), U8(0), U8(4),
|
|
B(PushContext), R(2),
|
|
B(Ldar), R(this),
|
|
B(StaCurrentContextSlot), U8(5),
|
|
B(Ldar), R(arg0),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
B(CreateMappedArguments),
|
|
B(StaCurrentContextSlot), U8(7),
|
|
B(Ldar), R(1),
|
|
B(StaCurrentContextSlot), U8(6),
|
|
/* 10 E> */ B(StackCheck),
|
|
B(CreateBlockContext), U8(1),
|
|
B(PushContext), R(3),
|
|
B(LdaTheHole),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
/* 34 S> */ B(LdaContextSlot), R(3), U8(4), U8(0),
|
|
B(Star), R(6),
|
|
B(GetIterator), R(6), U8(0), U8(2),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
|
B(Star), R(5),
|
|
B(LdaNamedProperty), R(5), U8(2), U8(4),
|
|
B(Star), R(4),
|
|
B(LdaFalse),
|
|
B(Star), R(6),
|
|
B(Mov), R(context), R(9),
|
|
B(LdaTrue),
|
|
B(Star), R(6),
|
|
/* 29 S> */ B(CallProperty0), R(4), R(5), U8(6),
|
|
B(Star), R(10),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
|
|
B(LdaNamedProperty), R(10), U8(3), U8(8),
|
|
B(JumpIfToBooleanTrue), U8(75),
|
|
B(LdaNamedProperty), R(10), U8(4), U8(10),
|
|
B(Star), R(10),
|
|
B(LdaFalse),
|
|
B(Star), R(6),
|
|
B(Mov), R(10), R(0),
|
|
/* 20 E> */ B(StackCheck),
|
|
B(CreateBlockContext), U8(5),
|
|
B(PushContext), R(11),
|
|
B(LdaTheHole),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
/* 29 S> */ B(Ldar), R(0),
|
|
/* 29 E> */ B(StaCurrentContextSlot), U8(4),
|
|
/* 41 S> */ B(LdaLookupGlobalSlot), U8(6), U8(12), U8(3),
|
|
B(Star), R(12),
|
|
B(LdaConstant), U8(7),
|
|
B(Star), R(13),
|
|
B(LdaZero),
|
|
B(Star), R(17),
|
|
B(LdaSmi), I8(37),
|
|
B(Star), R(18),
|
|
B(LdaSmi), I8(41),
|
|
B(Star), R(19),
|
|
B(Mov), R(12), R(14),
|
|
B(Mov), R(13), R(15),
|
|
B(Mov), R(closure), R(16),
|
|
B(CallRuntime), U16(Runtime::kResolvePossiblyDirectEval), R(14), U8(6),
|
|
B(Star), R(12),
|
|
/* 41 E> */ B(CallUndefinedReceiver1), R(12), R(13), U8(14),
|
|
B(PopContext), R(11),
|
|
B(Mov), R(0), R(10),
|
|
B(JumpLoop), U8(92), I8(0),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(8),
|
|
B(Star), R(7),
|
|
B(Jump), U8(7),
|
|
B(Star), R(8),
|
|
B(LdaZero),
|
|
B(Star), R(7),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star), R(9),
|
|
B(Ldar), R(6),
|
|
B(JumpIfToBooleanTrue), U8(58),
|
|
B(LdaNamedProperty), R(5), U8(8), U8(16),
|
|
B(Star), R(12),
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
|
B(Mov), R(context), R(13),
|
|
B(TestTypeOf), U8(6),
|
|
B(JumpIfTrue), U8(18),
|
|
B(Wide), B(LdaSmi), I16(159),
|
|
B(Star), R(14),
|
|
B(LdaConstant), U8(9),
|
|
B(Star), R(15),
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(14), U8(2),
|
|
B(Throw),
|
|
B(CallProperty0), R(12), R(5), U8(18),
|
|
B(JumpIfJSReceiver), U8(21),
|
|
B(Star), R(14),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1),
|
|
B(Jump), U8(12),
|
|
B(Star), R(13),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(7),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(13),
|
|
B(ReThrow),
|
|
B(Ldar), R(9),
|
|
B(SetPendingMessage),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(7),
|
|
B(JumpIfFalse), U8(5),
|
|
B(Ldar), R(8),
|
|
B(ReThrow),
|
|
B(PopContext), R(3),
|
|
B(LdaUndefined),
|
|
/* 54 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
SCOPE_INFO_TYPE,
|
|
SCOPE_INFO_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
SCOPE_INFO_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["eval"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["1"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
|
]
|
|
handlers: [
|
|
[59, 154, 162],
|
|
[186, 219, 221],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
function f(arr) {
|
|
for (let x of arr) { (function() { return x; })(); }
|
|
}
|
|
f([1, 2, 3]);
|
|
"
|
|
frame size: 14
|
|
parameter count: 2
|
|
bytecode array length: 179
|
|
bytecodes: [
|
|
/* 10 E> */ B(StackCheck),
|
|
/* 34 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
|
B(Star), R(3),
|
|
B(LdaNamedProperty), R(3), U8(0), U8(4),
|
|
B(Star), R(2),
|
|
B(LdaFalse),
|
|
B(Star), R(4),
|
|
B(Mov), R(context), R(7),
|
|
B(LdaTrue),
|
|
B(Star), R(4),
|
|
/* 29 S> */ B(CallProperty0), R(2), R(3), U8(6),
|
|
B(Star), R(8),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
|
|
B(LdaNamedProperty), R(8), U8(1), U8(8),
|
|
B(JumpIfToBooleanTrue), U8(43),
|
|
B(LdaNamedProperty), R(8), U8(2), U8(10),
|
|
B(Star), R(8),
|
|
B(LdaFalse),
|
|
B(Star), R(4),
|
|
B(Mov), R(8), R(0),
|
|
/* 20 E> */ B(StackCheck),
|
|
B(CreateBlockContext), U8(3),
|
|
B(PushContext), R(9),
|
|
B(LdaTheHole),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
/* 29 S> */ B(Ldar), R(0),
|
|
/* 29 E> */ B(StaCurrentContextSlot), U8(4),
|
|
/* 41 S> */ B(CreateClosure), U8(4), U8(0), U8(2),
|
|
B(Star), R(10),
|
|
/* 67 E> */ B(CallUndefinedReceiver0), R(10), U8(12),
|
|
B(PopContext), R(9),
|
|
B(Mov), R(0), R(8),
|
|
B(JumpLoop), U8(60), I8(0),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(6),
|
|
B(Star), R(5),
|
|
B(Jump), U8(7),
|
|
B(Star), R(6),
|
|
B(LdaZero),
|
|
B(Star), R(5),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star), R(7),
|
|
B(Ldar), R(4),
|
|
B(JumpIfToBooleanTrue), U8(58),
|
|
B(LdaNamedProperty), R(3), U8(5), U8(14),
|
|
B(Star), R(10),
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
|
B(Mov), R(context), R(11),
|
|
B(TestTypeOf), U8(6),
|
|
B(JumpIfTrue), U8(18),
|
|
B(Wide), B(LdaSmi), I16(159),
|
|
B(Star), R(12),
|
|
B(LdaConstant), U8(6),
|
|
B(Star), R(13),
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(12), U8(2),
|
|
B(Throw),
|
|
B(CallProperty0), R(10), R(3), U8(16),
|
|
B(JumpIfJSReceiver), U8(21),
|
|
B(Star), R(12),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
|
|
B(Jump), U8(12),
|
|
B(Star), R(11),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(5),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(11),
|
|
B(ReThrow),
|
|
B(Ldar), R(7),
|
|
B(SetPendingMessage),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(5),
|
|
B(JumpIfFalse), U8(5),
|
|
B(Ldar), R(6),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
/* 73 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
SCOPE_INFO_TYPE,
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
|
]
|
|
handlers: [
|
|
[26, 89, 97],
|
|
[121, 154, 156],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
function f(arr) {
|
|
for (let { x, y } of arr) { let z = x + y; }
|
|
}
|
|
f([{ x: 0, y: 3 }, { x: 1, y: 9 }, { x: -12, y: 17 }]);
|
|
"
|
|
frame size: 17
|
|
parameter count: 2
|
|
bytecode array length: 173
|
|
bytecodes: [
|
|
/* 10 E> */ B(StackCheck),
|
|
/* 41 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
|
B(Star), R(7),
|
|
B(LdaNamedProperty), R(7), U8(0), U8(4),
|
|
B(Star), R(6),
|
|
B(LdaFalse),
|
|
B(Star), R(8),
|
|
B(Mov), R(context), R(11),
|
|
B(LdaTrue),
|
|
B(Star), R(8),
|
|
/* 36 S> */ B(CallProperty0), R(6), R(7), U8(6),
|
|
B(Star), R(12),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
|
|
B(LdaNamedProperty), R(12), U8(1), U8(8),
|
|
B(JumpIfToBooleanTrue), U8(37),
|
|
B(LdaNamedProperty), R(12), U8(2), U8(10),
|
|
B(Star), R(12),
|
|
B(LdaFalse),
|
|
B(Star), R(8),
|
|
B(Mov), R(12), R(0),
|
|
/* 20 E> */ B(StackCheck),
|
|
/* 31 S> */ B(LdaNamedProperty), R(0), U8(3), U8(12),
|
|
B(Star), R(3),
|
|
/* 34 S> */ B(LdaNamedProperty), R(0), U8(4), U8(14),
|
|
B(Star), R(4),
|
|
/* 56 S> */ B(Ldar), R(4),
|
|
/* 58 E> */ B(Add), R(3), U8(16),
|
|
B(Star), R(5),
|
|
B(JumpLoop), U8(54), I8(0),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(10),
|
|
B(Star), R(9),
|
|
B(Jump), U8(7),
|
|
B(Star), R(10),
|
|
B(LdaZero),
|
|
B(Star), R(9),
|
|
B(LdaTheHole),
|
|
/* 56 E> */ B(SetPendingMessage),
|
|
B(Star), R(11),
|
|
B(Ldar), R(8),
|
|
B(JumpIfToBooleanTrue), U8(58),
|
|
B(LdaNamedProperty), R(7), U8(5), U8(17),
|
|
B(Star), R(13),
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
|
B(Mov), R(context), R(14),
|
|
B(TestTypeOf), U8(6),
|
|
B(JumpIfTrue), U8(18),
|
|
B(Wide), B(LdaSmi), I16(159),
|
|
B(Star), R(15),
|
|
B(LdaConstant), U8(6),
|
|
B(Star), R(16),
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(15), U8(2),
|
|
B(Throw),
|
|
B(CallProperty0), R(13), R(7), U8(19),
|
|
B(JumpIfJSReceiver), U8(21),
|
|
B(Star), R(15),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(15), U8(1),
|
|
B(Jump), U8(12),
|
|
B(Star), R(14),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(9),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(14),
|
|
B(ReThrow),
|
|
B(Ldar), R(11),
|
|
B(SetPendingMessage),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(9),
|
|
B(JumpIfFalse), U8(5),
|
|
B(Ldar), R(10),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
/* 65 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["y"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
|
]
|
|
handlers: [
|
|
[26, 83, 91],
|
|
[115, 148, 150],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
function* f(arr) {
|
|
for (let x of arr) { let y = x; }
|
|
}
|
|
f([1, 2, 3]);
|
|
"
|
|
frame size: 16
|
|
parameter count: 2
|
|
bytecode array length: 203
|
|
bytecodes: [
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
|
|
B(Mov), R(closure), R(5),
|
|
B(Mov), R(this), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(5), U8(2),
|
|
B(Star), R(0),
|
|
/* 11 E> */ B(StackCheck),
|
|
/* 11 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(1), U8(2), I8(0),
|
|
B(Ldar), R(5),
|
|
/* 11 E> */ B(Throw),
|
|
B(Ldar), R(5),
|
|
/* 55 S> */ B(Return),
|
|
/* 35 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
|
B(Star), R(6),
|
|
B(LdaNamedProperty), R(6), U8(3), U8(4),
|
|
B(Star), R(5),
|
|
B(LdaFalse),
|
|
B(Star), R(7),
|
|
B(Mov), R(context), R(10),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
/* 30 S> */ B(CallProperty0), R(5), R(6), U8(6),
|
|
B(Star), R(11),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
|
|
B(LdaNamedProperty), R(11), U8(4), U8(8),
|
|
B(JumpIfToBooleanTrue), U8(26),
|
|
B(LdaNamedProperty), R(11), U8(5), U8(10),
|
|
B(Star), R(11),
|
|
B(LdaFalse),
|
|
B(Star), R(7),
|
|
B(Mov), R(11), R(1),
|
|
/* 21 E> */ B(StackCheck),
|
|
/* 30 S> */ B(Mov), R(1), R(3),
|
|
/* 50 S> */ B(Mov), R(3), R(4),
|
|
B(Ldar), R(11),
|
|
B(JumpLoop), U8(43), I8(0),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(9),
|
|
B(Star), R(8),
|
|
B(Jump), U8(7),
|
|
B(Star), R(9),
|
|
B(LdaZero),
|
|
B(Star), R(8),
|
|
B(LdaTheHole),
|
|
/* 50 E> */ B(SetPendingMessage),
|
|
B(Star), R(10),
|
|
B(Ldar), R(7),
|
|
B(JumpIfToBooleanTrue), U8(58),
|
|
B(LdaNamedProperty), R(6), U8(6), U8(12),
|
|
B(Star), R(12),
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
|
B(Mov), R(context), R(13),
|
|
B(TestTypeOf), U8(6),
|
|
B(JumpIfTrue), U8(18),
|
|
B(Wide), B(LdaSmi), I16(159),
|
|
B(Star), R(14),
|
|
B(LdaConstant), U8(7),
|
|
B(Star), R(15),
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(14), U8(2),
|
|
B(Throw),
|
|
B(CallProperty0), R(12), R(6), U8(14),
|
|
B(JumpIfJSReceiver), U8(21),
|
|
B(Star), R(14),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1),
|
|
B(Jump), U8(12),
|
|
B(Star), R(13),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(8),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(13),
|
|
B(ReThrow),
|
|
B(Ldar), R(10),
|
|
B(SetPendingMessage),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(8),
|
|
B(JumpIfFalse), U8(5),
|
|
B(Ldar), R(9),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
/* 55 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [22],
|
|
Smi [10],
|
|
Smi [7],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
|
]
|
|
handlers: [
|
|
[67, 113, 121],
|
|
[145, 178, 180],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
function* f(arr) {
|
|
for (let x of arr) yield x;
|
|
}
|
|
f([1, 2, 3]);
|
|
"
|
|
frame size: 15
|
|
parameter count: 2
|
|
bytecode array length: 247
|
|
bytecodes: [
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(2),
|
|
B(Mov), R(closure), R(4),
|
|
B(Mov), R(this), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateJSGeneratorObject), R(4), U8(2),
|
|
B(Star), R(0),
|
|
/* 11 E> */ B(StackCheck),
|
|
/* 11 E> */ B(SuspendGenerator), R(0), R(0), U8(4), U8(0),
|
|
B(ResumeGenerator), R(0), R(0), U8(4),
|
|
B(Star), R(4),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
|
|
B(Ldar), R(4),
|
|
/* 11 E> */ B(Throw),
|
|
B(Ldar), R(4),
|
|
/* 49 S> */ B(Return),
|
|
/* 35 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
|
B(Star), R(5),
|
|
B(LdaNamedProperty), R(5), U8(4), U8(4),
|
|
B(Star), R(4),
|
|
B(LdaFalse),
|
|
B(Star), R(6),
|
|
B(Mov), R(context), R(9),
|
|
B(LdaTrue),
|
|
B(Star), R(6),
|
|
/* 30 S> */ B(CallProperty0), R(4), R(5), U8(6),
|
|
B(Star), R(10),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
|
|
B(LdaNamedProperty), R(10), U8(5), U8(8),
|
|
B(JumpIfToBooleanTrue), U8(64),
|
|
B(LdaNamedProperty), R(10), U8(6), U8(10),
|
|
B(Star), R(10),
|
|
B(LdaFalse),
|
|
B(Star), R(6),
|
|
B(Mov), R(10), R(1),
|
|
/* 21 E> */ B(StackCheck),
|
|
/* 30 S> */ B(Mov), R(1), R(3),
|
|
/* 40 S> */ B(LdaFalse),
|
|
B(Star), R(12),
|
|
B(Mov), R(3), R(11),
|
|
B(InvokeIntrinsic), U8(Runtime::k_CreateIterResultObject), R(11), U8(2),
|
|
/* 40 E> */ B(SuspendGenerator), R(0), R(0), U8(11), U8(1),
|
|
B(ResumeGenerator), R(0), R(0), U8(11),
|
|
B(Star), R(11),
|
|
B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(0), U8(1),
|
|
B(SwitchOnSmiNoFeedback), U8(7), U8(2), I8(0),
|
|
B(Ldar), R(11),
|
|
/* 40 E> */ B(Throw),
|
|
B(LdaSmi), I8(1),
|
|
B(Star), R(7),
|
|
B(Mov), R(11), R(8),
|
|
B(Jump), U8(20),
|
|
B(Ldar), R(11),
|
|
B(JumpLoop), U8(81), I8(0),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(8),
|
|
B(Star), R(7),
|
|
B(Jump), U8(7),
|
|
B(Star), R(8),
|
|
B(LdaZero),
|
|
B(Star), R(7),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star), R(9),
|
|
B(Ldar), R(6),
|
|
B(JumpIfToBooleanTrue), U8(58),
|
|
B(LdaNamedProperty), R(5), U8(9), U8(12),
|
|
B(Star), R(11),
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
|
B(Mov), R(context), R(12),
|
|
B(TestTypeOf), U8(6),
|
|
B(JumpIfTrue), U8(18),
|
|
B(Wide), B(LdaSmi), I16(159),
|
|
B(Star), R(13),
|
|
B(LdaConstant), U8(10),
|
|
B(Star), R(14),
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(13), U8(2),
|
|
B(Throw),
|
|
B(CallProperty0), R(11), R(5), U8(14),
|
|
B(JumpIfJSReceiver), U8(21),
|
|
B(Star), R(13),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(13), U8(1),
|
|
B(Jump), U8(12),
|
|
B(Star), R(12),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(7),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(12),
|
|
B(ReThrow),
|
|
B(Ldar), R(9),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(7),
|
|
B(SwitchOnSmiNoFeedback), U8(11), U8(2), I8(0),
|
|
B(Jump), U8(8),
|
|
B(Ldar), R(8),
|
|
B(ReThrow),
|
|
B(Ldar), R(8),
|
|
/* 49 S> */ B(Return),
|
|
B(LdaUndefined),
|
|
/* 49 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [22],
|
|
Smi [120],
|
|
Smi [10],
|
|
Smi [7],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
Smi [16],
|
|
Smi [7],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
|
Smi [6],
|
|
Smi [9],
|
|
]
|
|
handlers: [
|
|
[67, 151, 159],
|
|
[183, 216, 218],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
async function f(arr) {
|
|
for (let x of arr) { let y = x; }
|
|
}
|
|
f([1, 2, 3]);
|
|
"
|
|
frame size: 17
|
|
parameter count: 2
|
|
bytecode array length: 217
|
|
bytecodes: [
|
|
B(Mov), R(closure), R(5),
|
|
B(Mov), R(this), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(5), U8(2),
|
|
B(Star), R(0),
|
|
/* 16 E> */ B(StackCheck),
|
|
B(Mov), R(context), R(5),
|
|
/* 40 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
|
B(Star), R(7),
|
|
B(LdaNamedProperty), R(7), U8(0), U8(4),
|
|
B(Star), R(6),
|
|
B(LdaFalse),
|
|
B(Star), R(8),
|
|
B(Mov), R(context), R(11),
|
|
B(LdaTrue),
|
|
B(Star), R(8),
|
|
/* 35 S> */ B(CallProperty0), R(6), R(7), U8(6),
|
|
B(Star), R(12),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
|
|
B(LdaNamedProperty), R(12), U8(1), U8(8),
|
|
B(JumpIfToBooleanTrue), U8(26),
|
|
B(LdaNamedProperty), R(12), U8(2), U8(10),
|
|
B(Star), R(12),
|
|
B(LdaFalse),
|
|
B(Star), R(8),
|
|
B(Mov), R(12), R(1),
|
|
/* 26 E> */ B(StackCheck),
|
|
/* 35 S> */ B(Mov), R(1), R(3),
|
|
/* 55 S> */ B(Mov), R(3), R(4),
|
|
B(Ldar), R(12),
|
|
B(JumpLoop), U8(43), I8(0),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(10),
|
|
B(Star), R(9),
|
|
B(Jump), U8(7),
|
|
B(Star), R(10),
|
|
B(LdaZero),
|
|
B(Star), R(9),
|
|
B(LdaTheHole),
|
|
/* 55 E> */ B(SetPendingMessage),
|
|
B(Star), R(11),
|
|
B(Ldar), R(8),
|
|
B(JumpIfToBooleanTrue), U8(58),
|
|
B(LdaNamedProperty), R(7), U8(3), U8(12),
|
|
B(Star), R(13),
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
|
B(Mov), R(context), R(14),
|
|
B(TestTypeOf), U8(6),
|
|
B(JumpIfTrue), U8(18),
|
|
B(Wide), B(LdaSmi), I16(159),
|
|
B(Star), R(15),
|
|
B(LdaConstant), U8(4),
|
|
B(Star), R(16),
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(15), U8(2),
|
|
B(Throw),
|
|
B(CallProperty0), R(13), R(7), U8(14),
|
|
B(JumpIfJSReceiver), U8(21),
|
|
B(Star), R(15),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(15), U8(1),
|
|
B(Jump), U8(12),
|
|
B(Star), R(14),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(9),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(14),
|
|
B(ReThrow),
|
|
B(Ldar), R(11),
|
|
B(SetPendingMessage),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(9),
|
|
B(JumpIfFalse), U8(5),
|
|
B(Ldar), R(10),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
B(Star), R(7),
|
|
B(LdaFalse),
|
|
B(Star), R(8),
|
|
B(Mov), R(0), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(6), U8(3),
|
|
/* 60 S> */ B(Return),
|
|
B(Star), R(6),
|
|
B(CreateCatchContext), R(6), 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(LdaFalse),
|
|
B(Star), R(9),
|
|
B(Mov), R(0), R(7),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(7), U8(3),
|
|
/* 60 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
|
SCOPE_INFO_TYPE,
|
|
]
|
|
handlers: [
|
|
[16, 189, 189],
|
|
[41, 87, 95],
|
|
[119, 152, 154],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
async function f(arr) {
|
|
for (let x of arr) await x;
|
|
}
|
|
f([1, 2, 3]);
|
|
"
|
|
frame size: 16
|
|
parameter count: 2
|
|
bytecode array length: 253
|
|
bytecodes: [
|
|
B(SwitchOnGeneratorState), R(0), U8(0), U8(1),
|
|
B(Mov), R(closure), R(4),
|
|
B(Mov), R(this), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionEnter), R(4), U8(2),
|
|
B(Star), R(0),
|
|
/* 16 E> */ B(StackCheck),
|
|
B(Mov), R(context), R(4),
|
|
/* 40 S> */ B(GetIterator), R(arg0), U8(0), U8(2),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowSymbolIteratorInvalid), R(0), U8(0),
|
|
B(Star), R(6),
|
|
B(LdaNamedProperty), R(6), U8(1), U8(4),
|
|
B(Star), R(5),
|
|
B(LdaFalse),
|
|
B(Star), R(7),
|
|
B(Mov), R(context), R(10),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
/* 35 S> */ B(CallProperty0), R(5), R(6), U8(6),
|
|
B(Star), R(11),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
|
|
B(LdaNamedProperty), R(11), U8(2), U8(8),
|
|
B(JumpIfToBooleanTrue), U8(58),
|
|
B(LdaNamedProperty), R(11), U8(3), U8(10),
|
|
B(Star), R(11),
|
|
B(LdaFalse),
|
|
B(Star), R(7),
|
|
B(Mov), R(11), R(1),
|
|
/* 26 E> */ B(StackCheck),
|
|
/* 35 S> */ B(Mov), R(1), R(3),
|
|
/* 45 S> */ B(Mov), R(0), R(12),
|
|
B(Mov), R(3), R(13),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionAwaitUncaught), R(12), U8(2),
|
|
/* 45 E> */ B(SuspendGenerator), R(0), R(0), U8(12), U8(0),
|
|
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(JumpLoop), U8(75), I8(0),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star), R(9),
|
|
B(Star), R(8),
|
|
B(Jump), U8(7),
|
|
B(Star), R(9),
|
|
B(LdaZero),
|
|
B(Star), R(8),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star), R(10),
|
|
B(Ldar), R(7),
|
|
B(JumpIfToBooleanTrue), U8(58),
|
|
B(LdaNamedProperty), R(6), U8(4), U8(12),
|
|
B(Star), R(12),
|
|
B(JumpIfUndefinedOrNull), U8(50),
|
|
B(Mov), R(context), R(13),
|
|
B(TestTypeOf), U8(6),
|
|
B(JumpIfTrue), U8(18),
|
|
B(Wide), B(LdaSmi), I16(159),
|
|
B(Star), R(14),
|
|
B(LdaConstant), U8(5),
|
|
B(Star), R(15),
|
|
B(CallRuntime), U16(Runtime::kNewTypeError), R(14), U8(2),
|
|
B(Throw),
|
|
B(CallProperty0), R(12), R(6), U8(14),
|
|
B(JumpIfJSReceiver), U8(21),
|
|
B(Star), R(14),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(14), U8(1),
|
|
B(Jump), U8(12),
|
|
B(Star), R(13),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(8),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(13),
|
|
B(ReThrow),
|
|
B(Ldar), R(10),
|
|
B(SetPendingMessage),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(8),
|
|
B(JumpIfFalse), U8(5),
|
|
B(Ldar), R(9),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
B(Star), R(6),
|
|
B(LdaTrue),
|
|
B(Star), R(7),
|
|
B(Mov), R(0), R(5),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionResolve), R(5), U8(3),
|
|
/* 54 S> */ B(Return),
|
|
B(Star), R(5),
|
|
B(CreateCatchContext), R(5), U8(6),
|
|
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(LdaTrue),
|
|
B(Star), R(8),
|
|
B(Mov), R(0), R(6),
|
|
B(InvokeIntrinsic), U8(Runtime::k_AsyncFunctionReject), R(6), U8(3),
|
|
/* 54 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
Smi [98],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
|
|
ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
|
|
SCOPE_INFO_TYPE,
|
|
]
|
|
handlers: [
|
|
[20, 225, 225],
|
|
[45, 123, 131],
|
|
[155, 188, 190],
|
|
]
|
|
|