forked from LeenkxTeam/Kmake
373 lines
12 KiB
Plaintext
373 lines
12 KiB
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
wrap: yes
|
|
|
|
---
|
|
snippet: "
|
|
for (var p of [0, 1, 2]) {}
|
|
"
|
|
frame size: 12
|
|
parameter count: 1
|
|
bytecode array length: 123
|
|
bytecodes: [
|
|
/* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
|
|
B(Star4),
|
|
B(GetIterator), R(4), U8(1), U8(3),
|
|
B(Star3),
|
|
B(GetNamedProperty), R(3), U8(1), U8(5),
|
|
B(Star2),
|
|
B(LdaFalse),
|
|
B(Star4),
|
|
B(LdaTheHole),
|
|
B(Star7),
|
|
B(Mov), R(context), R(8),
|
|
B(LdaTrue),
|
|
B(Star4),
|
|
/* 43 S> */ B(CallProperty0), R(2), R(3), U8(7),
|
|
B(Star9),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
|
|
B(GetNamedProperty), R(9), U8(2), U8(9),
|
|
B(JumpIfToBooleanTrue), U8(21),
|
|
B(GetNamedProperty), R(9), U8(3), U8(11),
|
|
B(Star9),
|
|
B(LdaFalse),
|
|
B(Star4),
|
|
B(Mov), R(9), R(1),
|
|
/* 43 S> */ B(Mov), R(1), R(0),
|
|
B(Ldar), R(9),
|
|
/* 34 E> */ B(JumpLoop), U8(35), I8(0), U8(13),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star6),
|
|
B(Star5),
|
|
B(Jump), U8(8),
|
|
B(Star6),
|
|
B(LdaZero),
|
|
B(Star5),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star7),
|
|
B(Ldar), R(4),
|
|
B(JumpIfToBooleanTrue), U8(35),
|
|
B(Mov), R(context), R(9),
|
|
B(GetNamedProperty), R(3), U8(4), U8(14),
|
|
B(JumpIfUndefinedOrNull), U8(26),
|
|
B(Star10),
|
|
B(CallProperty0), R(10), R(3), U8(16),
|
|
B(JumpIfJSReceiver), U8(19),
|
|
B(Star11),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
|
|
B(Jump), U8(11),
|
|
B(Star9),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(5),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(9),
|
|
B(ReThrow),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(5),
|
|
B(JumpIfFalse), U8(8),
|
|
B(Ldar), R(7),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(6),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
/* 62 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["next"],
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["done"],
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["value"],
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["return"],
|
|
]
|
|
handlers: [
|
|
[22, 61, 67],
|
|
[80, 99, 101],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var x = 'potatoes';
|
|
for (var p of x) { return p; }
|
|
"
|
|
frame size: 13
|
|
parameter count: 1
|
|
bytecode array length: 129
|
|
bytecodes: [
|
|
/* 42 S> */ B(LdaConstant), U8(0),
|
|
B(Star0),
|
|
/* 68 S> */ B(GetIterator), R(0), U8(0), U8(2),
|
|
B(Star4),
|
|
B(GetNamedProperty), R(4), U8(1), U8(4),
|
|
B(Star3),
|
|
B(LdaFalse),
|
|
B(Star5),
|
|
B(LdaTheHole),
|
|
B(Star8),
|
|
B(Mov), R(context), R(9),
|
|
B(LdaTrue),
|
|
B(Star5),
|
|
/* 63 S> */ B(CallProperty0), R(3), R(4), U8(6),
|
|
B(Star10),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
|
|
B(GetNamedProperty), R(10), U8(2), U8(8),
|
|
B(JumpIfToBooleanTrue), U8(23),
|
|
B(GetNamedProperty), R(10), U8(3), U8(10),
|
|
B(Star10),
|
|
B(LdaFalse),
|
|
B(Star5),
|
|
B(Mov), R(10), R(2),
|
|
/* 63 S> */ B(Mov), R(2), R(1),
|
|
/* 73 S> */ B(LdaSmi), I8(1),
|
|
B(Mov), R(10), R(7),
|
|
B(Star6),
|
|
B(Jump), U8(14),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star7),
|
|
B(Star6),
|
|
B(Jump), U8(8),
|
|
B(Star7),
|
|
B(LdaZero),
|
|
B(Star6),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star8),
|
|
B(Ldar), R(5),
|
|
B(JumpIfToBooleanTrue), U8(35),
|
|
B(Mov), R(context), R(10),
|
|
B(GetNamedProperty), R(4), U8(4), U8(13),
|
|
B(JumpIfUndefinedOrNull), U8(26),
|
|
B(Star11),
|
|
B(CallProperty0), R(11), R(4), U8(15),
|
|
B(JumpIfJSReceiver), U8(19),
|
|
B(Star12),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(12), U8(1),
|
|
B(Jump), U8(11),
|
|
B(Star10),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(6),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(10),
|
|
B(ReThrow),
|
|
B(Ldar), R(6),
|
|
B(SwitchOnSmiNoFeedback), U8(5), U8(2), I8(0),
|
|
B(Jump), U8(11),
|
|
B(Ldar), R(8),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(7),
|
|
B(ReThrow),
|
|
B(Ldar), R(7),
|
|
B(Return),
|
|
B(LdaUndefined),
|
|
/* 85 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["potatoes"],
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["next"],
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["done"],
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["value"],
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["return"],
|
|
Smi [6],
|
|
Smi [12],
|
|
]
|
|
handlers: [
|
|
[20, 61, 67],
|
|
[80, 99, 101],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
for (var x of [10, 20, 30]) {
|
|
if (x == 10) continue;
|
|
if (x == 20) break;
|
|
}
|
|
"
|
|
frame size: 12
|
|
parameter count: 1
|
|
bytecode array length: 139
|
|
bytecodes: [
|
|
/* 48 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(37),
|
|
B(Star4),
|
|
B(GetIterator), R(4), U8(1), U8(3),
|
|
B(Star3),
|
|
B(GetNamedProperty), R(3), U8(1), U8(5),
|
|
B(Star2),
|
|
B(LdaFalse),
|
|
B(Star4),
|
|
B(LdaTheHole),
|
|
B(Star7),
|
|
B(Mov), R(context), R(8),
|
|
B(LdaTrue),
|
|
B(Star4),
|
|
/* 43 S> */ B(CallProperty0), R(2), R(3), U8(7),
|
|
B(Star9),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(9), U8(1),
|
|
B(GetNamedProperty), R(9), U8(2), U8(9),
|
|
B(JumpIfToBooleanTrue), U8(37),
|
|
B(GetNamedProperty), R(9), U8(3), U8(11),
|
|
B(Star9),
|
|
B(LdaFalse),
|
|
B(Star4),
|
|
B(Mov), R(9), R(1),
|
|
/* 43 S> */ B(Mov), R(1), R(0),
|
|
/* 66 S> */ B(LdaSmi), I8(10),
|
|
/* 72 E> */ B(TestEqual), R(9), U8(13),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 79 S> */ B(Jump), U8(11),
|
|
/* 91 S> */ B(LdaSmi), I8(20),
|
|
/* 97 E> */ B(TestEqual), R(0), U8(14),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 104 S> */ B(Jump), U8(6),
|
|
/* 34 E> */ B(JumpLoop), U8(51), I8(0), U8(15),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star6),
|
|
B(Star5),
|
|
B(Jump), U8(8),
|
|
B(Star6),
|
|
B(LdaZero),
|
|
B(Star5),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star7),
|
|
B(Ldar), R(4),
|
|
B(JumpIfToBooleanTrue), U8(35),
|
|
B(Mov), R(context), R(9),
|
|
B(GetNamedProperty), R(3), U8(4), U8(16),
|
|
B(JumpIfUndefinedOrNull), U8(26),
|
|
B(Star10),
|
|
B(CallProperty0), R(10), R(3), U8(18),
|
|
B(JumpIfJSReceiver), U8(19),
|
|
B(Star11),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(11), U8(1),
|
|
B(Jump), U8(11),
|
|
B(Star9),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(5),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(9),
|
|
B(ReThrow),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(5),
|
|
B(JumpIfFalse), U8(8),
|
|
B(Ldar), R(7),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(6),
|
|
B(ReThrow),
|
|
B(LdaUndefined),
|
|
/* 113 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["next"],
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["done"],
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["value"],
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["return"],
|
|
]
|
|
handlers: [
|
|
[22, 77, 83],
|
|
[96, 115, 117],
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var x = { 'a': 1, 'b': 2 };
|
|
for (x['a'] of [1,2,3]) { return x['a']; }
|
|
"
|
|
frame size: 11
|
|
parameter count: 1
|
|
bytecode array length: 138
|
|
bytecodes: [
|
|
/* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(41),
|
|
B(Star0),
|
|
/* 77 S> */ B(CreateArrayLiteral), U8(1), U8(1), U8(37),
|
|
B(Star3),
|
|
B(GetIterator), R(3), U8(2), U8(4),
|
|
B(Star2),
|
|
B(GetNamedProperty), R(2), U8(2), U8(6),
|
|
B(Star1),
|
|
B(LdaFalse),
|
|
B(Star3),
|
|
B(LdaTheHole),
|
|
B(Star6),
|
|
B(Mov), R(context), R(7),
|
|
B(LdaTrue),
|
|
B(Star3),
|
|
/* 68 S> */ B(CallProperty0), R(1), R(2), U8(8),
|
|
B(Star8),
|
|
B(JumpIfJSReceiver), U8(7),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(8), U8(1),
|
|
B(GetNamedProperty), R(8), U8(3), U8(10),
|
|
B(JumpIfToBooleanTrue), U8(25),
|
|
B(GetNamedProperty), R(8), U8(4), U8(12),
|
|
B(Star8),
|
|
B(LdaFalse),
|
|
B(Star3),
|
|
B(Ldar), R(8),
|
|
/* 67 E> */ B(SetNamedProperty), R(0), U8(5), U8(14),
|
|
/* 96 S> */ B(GetNamedProperty), R(0), U8(5), U8(16),
|
|
B(Star5),
|
|
B(LdaSmi), I8(1),
|
|
B(Star4),
|
|
B(Jump), U8(14),
|
|
B(LdaSmi), I8(-1),
|
|
B(Star5),
|
|
B(Star4),
|
|
B(Jump), U8(8),
|
|
B(Star5),
|
|
B(LdaZero),
|
|
B(Star4),
|
|
B(LdaTheHole),
|
|
B(SetPendingMessage),
|
|
B(Star6),
|
|
B(Ldar), R(3),
|
|
B(JumpIfToBooleanTrue), U8(35),
|
|
B(Mov), R(context), R(8),
|
|
B(GetNamedProperty), R(2), U8(6), U8(19),
|
|
B(JumpIfUndefinedOrNull), U8(26),
|
|
B(Star9),
|
|
B(CallProperty0), R(9), R(2), U8(21),
|
|
B(JumpIfJSReceiver), U8(19),
|
|
B(Star10),
|
|
B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R(10), U8(1),
|
|
B(Jump), U8(11),
|
|
B(Star8),
|
|
B(LdaZero),
|
|
B(TestReferenceEqual), R(4),
|
|
B(JumpIfTrue), U8(5),
|
|
B(Ldar), R(8),
|
|
B(ReThrow),
|
|
B(Ldar), R(4),
|
|
B(SwitchOnSmiNoFeedback), U8(7), U8(2), I8(0),
|
|
B(Jump), U8(11),
|
|
B(Ldar), R(6),
|
|
B(SetPendingMessage),
|
|
B(Ldar), R(5),
|
|
B(ReThrow),
|
|
B(Ldar), R(5),
|
|
B(Return),
|
|
B(LdaUndefined),
|
|
/* 105 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
OBJECT_BOILERPLATE_DESCRIPTION_TYPE,
|
|
ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["next"],
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["done"],
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["value"],
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["a"],
|
|
INTERNALIZED_ONE_BYTE_STRING_TYPE ["return"],
|
|
Smi [6],
|
|
Smi [12],
|
|
]
|
|
handlers: [
|
|
[27, 70, 76],
|
|
[89, 108, 110],
|
|
]
|
|
|