d2caa302a7
The majority of context slot accesses are to the local context (current context register and depth 0), so this adds bytecodes to optimise for that case. This cuts down bytecode size by roughly 1% (measured on Octane and Top25). Review-Url: https://codereview.chromium.org/2459513002 Cr-Commit-Position: refs/heads/master@{#40641}
720 lines
16 KiB
Plaintext
720 lines
16 KiB
Plaintext
#
|
|
# Autogenerated by generate-bytecode-expectations.
|
|
#
|
|
|
|
---
|
|
wrap: yes
|
|
|
|
---
|
|
snippet: "
|
|
var x = 0;
|
|
while (false) { x = 99; break; continue; }
|
|
return x;
|
|
"
|
|
frame size: 1
|
|
parameter count: 1
|
|
bytecode array length: 6
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 88 S> */ B(Nop),
|
|
/* 98 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var x = 0;
|
|
while (false) {
|
|
x = x + 1;
|
|
};
|
|
return x;
|
|
"
|
|
frame size: 1
|
|
parameter count: 1
|
|
bytecode array length: 6
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 77 S> */ B(Nop),
|
|
/* 87 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var x = 0;
|
|
var y = 1;
|
|
while (x < 10) {
|
|
y = y * 12;
|
|
x = x + 1;
|
|
if (x == 3) continue;
|
|
if (x == 4) break;
|
|
}
|
|
return y;
|
|
"
|
|
frame size: 2
|
|
parameter count: 1
|
|
bytecode array length: 53
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 53 S> */ B(LdaSmi), U8(1),
|
|
B(Star), R(1),
|
|
/* 65 S> */ B(LdaSmi), U8(10),
|
|
/* 65 E> */ B(TestLessThan), R(0), U8(2),
|
|
B(JumpIfFalse), U8(37),
|
|
/* 56 E> */ B(StackCheck),
|
|
/* 75 S> */ B(LdaSmi), U8(12),
|
|
B(Mul), R(1), U8(3),
|
|
B(Star), R(1),
|
|
/* 89 S> */ B(AddSmi), U8(1), R(0), U8(4),
|
|
B(Star), R(0),
|
|
/* 102 S> */ B(LdaSmi), U8(3),
|
|
/* 108 E> */ B(TestEqual), R(0), U8(5),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 114 S> */ B(Jump), U8(11),
|
|
/* 126 S> */ B(LdaSmi), U8(4),
|
|
/* 132 E> */ B(TestEqual), R(0), U8(6),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 138 S> */ B(Jump), U8(5),
|
|
B(JumpLoop), U8(-39), U8(0),
|
|
/* 147 S> */ B(Ldar), R(1),
|
|
/* 157 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var i = 0;
|
|
while (true) {
|
|
if (i < 0) continue;
|
|
if (i == 3) break;
|
|
if (i == 4) break;
|
|
if (i == 10) continue;
|
|
if (i == 5) break;
|
|
i = i + 1;
|
|
}
|
|
return i;
|
|
"
|
|
frame size: 1
|
|
parameter count: 1
|
|
bytecode array length: 61
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 45 E> */ B(StackCheck),
|
|
/* 62 S> */ B(LdaZero),
|
|
/* 68 E> */ B(TestLessThan), R(0), U8(2),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 73 S> */ B(Jump), U8(44),
|
|
/* 85 S> */ B(LdaSmi), U8(3),
|
|
/* 91 E> */ B(TestEqual), R(0), U8(3),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 97 S> */ B(Jump), U8(38),
|
|
/* 106 S> */ B(LdaSmi), U8(4),
|
|
/* 112 E> */ B(TestEqual), R(0), U8(4),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 118 S> */ B(Jump), U8(29),
|
|
/* 127 S> */ B(LdaSmi), U8(10),
|
|
/* 133 E> */ B(TestEqual), R(0), U8(5),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 140 S> */ B(Jump), U8(17),
|
|
/* 152 S> */ B(LdaSmi), U8(5),
|
|
/* 158 E> */ B(TestEqual), R(0), U8(6),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 164 S> */ B(Jump), U8(11),
|
|
/* 173 S> */ B(AddSmi), U8(1), R(0), U8(7),
|
|
B(Star), R(0),
|
|
B(JumpLoop), U8(-51), U8(0),
|
|
/* 186 S> */ B(Ldar), R(0),
|
|
/* 196 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var i = 0;
|
|
while (true) {
|
|
while (i < 3) {
|
|
if (i == 2) break;
|
|
i = i + 1;
|
|
}
|
|
i = i + 1;
|
|
break;
|
|
}
|
|
return i;
|
|
"
|
|
frame size: 1
|
|
parameter count: 1
|
|
bytecode array length: 42
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 45 E> */ B(StackCheck),
|
|
/* 71 S> */ B(LdaSmi), U8(3),
|
|
/* 71 E> */ B(TestLessThan), R(0), U8(2),
|
|
B(JumpIfFalse), U8(21),
|
|
/* 62 E> */ B(StackCheck),
|
|
/* 82 S> */ B(LdaSmi), U8(2),
|
|
/* 88 E> */ B(TestEqual), R(0), U8(3),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 94 S> */ B(Jump), U8(11),
|
|
/* 105 S> */ B(AddSmi), U8(1), R(0), U8(4),
|
|
B(Star), R(0),
|
|
B(JumpLoop), U8(-23), U8(1),
|
|
/* 122 S> */ B(AddSmi), U8(1), R(0), U8(5),
|
|
B(Star), R(0),
|
|
/* 135 S> */ B(Jump), U8(2),
|
|
/* 144 S> */ B(Ldar), R(0),
|
|
/* 154 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var x = 10;
|
|
var y = 1;
|
|
while (x) {
|
|
y = y * 12;
|
|
x = x - 1;
|
|
}
|
|
return y;
|
|
"
|
|
frame size: 2
|
|
parameter count: 1
|
|
bytecode array length: 33
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaSmi), U8(10),
|
|
B(Star), R(0),
|
|
/* 54 S> */ B(LdaSmi), U8(1),
|
|
B(Star), R(1),
|
|
/* 64 S> */ B(Ldar), R(0),
|
|
B(JumpIfToBooleanFalse), U8(19),
|
|
/* 57 E> */ B(StackCheck),
|
|
/* 71 S> */ B(LdaSmi), U8(12),
|
|
B(Mul), R(1), U8(2),
|
|
B(Star), R(1),
|
|
/* 85 S> */ B(SubSmi), U8(1), R(0), U8(3),
|
|
B(Star), R(0),
|
|
B(JumpLoop), U8(-18), U8(0),
|
|
/* 98 S> */ B(Ldar), R(1),
|
|
/* 108 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var x = 0; var y = 1;
|
|
do {
|
|
y = y * 10;
|
|
if (x == 5) break;
|
|
if (x == 6) continue;
|
|
x = x + 1;
|
|
} while (x < 10);
|
|
return y;
|
|
"
|
|
frame size: 2
|
|
parameter count: 1
|
|
bytecode array length: 53
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 53 S> */ B(LdaSmi), U8(1),
|
|
B(Star), R(1),
|
|
/* 56 E> */ B(StackCheck),
|
|
/* 63 S> */ B(LdaSmi), U8(10),
|
|
B(Mul), R(1), U8(2),
|
|
B(Star), R(1),
|
|
/* 77 S> */ B(LdaSmi), U8(5),
|
|
/* 83 E> */ B(TestEqual), R(0), U8(3),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 89 S> */ B(Jump), U8(27),
|
|
/* 98 S> */ B(LdaSmi), U8(6),
|
|
/* 104 E> */ B(TestEqual), R(0), U8(4),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 110 S> */ B(Jump), U8(8),
|
|
/* 122 S> */ B(AddSmi), U8(1), R(0), U8(5),
|
|
B(Star), R(0),
|
|
/* 144 S> */ B(LdaSmi), U8(10),
|
|
/* 144 E> */ B(TestLessThan), R(0), U8(6),
|
|
B(JumpIfFalse), U8(5),
|
|
B(JumpLoop), U8(-39), U8(0),
|
|
/* 151 S> */ B(Ldar), R(1),
|
|
/* 161 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var x = 10;
|
|
var y = 1;
|
|
do {
|
|
y = y * 12;
|
|
x = x - 1;
|
|
} while (x);
|
|
return y;
|
|
"
|
|
frame size: 2
|
|
parameter count: 1
|
|
bytecode array length: 31
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaSmi), U8(10),
|
|
B(Star), R(0),
|
|
/* 54 S> */ B(LdaSmi), U8(1),
|
|
B(Star), R(1),
|
|
/* 57 E> */ B(StackCheck),
|
|
/* 64 S> */ B(LdaSmi), U8(12),
|
|
B(Mul), R(1), U8(2),
|
|
B(Star), R(1),
|
|
/* 78 S> */ B(SubSmi), U8(1), R(0), U8(3),
|
|
B(Star), R(0),
|
|
/* 98 S> */ B(JumpIfToBooleanFalse), U8(5),
|
|
B(JumpLoop), U8(-16), U8(0),
|
|
/* 102 S> */ B(Ldar), R(1),
|
|
/* 112 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var x = 0; var y = 1;
|
|
do {
|
|
y = y * 10;
|
|
if (x == 5) break;
|
|
x = x + 1;
|
|
if (x == 6) continue;
|
|
} while (false);
|
|
return y;
|
|
"
|
|
frame size: 2
|
|
parameter count: 1
|
|
bytecode array length: 43
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 53 S> */ B(LdaSmi), U8(1),
|
|
B(Star), R(1),
|
|
/* 56 E> */ B(StackCheck),
|
|
/* 63 S> */ B(LdaSmi), U8(10),
|
|
B(Mul), R(1), U8(2),
|
|
B(Star), R(1),
|
|
/* 77 S> */ B(LdaSmi), U8(5),
|
|
/* 83 E> */ B(TestEqual), R(0), U8(3),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 89 S> */ B(Jump), U8(17),
|
|
/* 98 S> */ B(AddSmi), U8(1), R(0), U8(4),
|
|
B(Star), R(0),
|
|
/* 111 S> */ B(LdaSmi), U8(6),
|
|
/* 117 E> */ B(TestEqual), R(0), U8(5),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 123 S> */ B(Jump), U8(2),
|
|
/* 150 S> */ B(Ldar), R(1),
|
|
/* 160 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var x = 0; var y = 1;
|
|
do {
|
|
y = y * 10;
|
|
if (x == 5) break;
|
|
x = x + 1;
|
|
if (x == 6) continue;
|
|
} while (true);
|
|
return y;
|
|
"
|
|
frame size: 2
|
|
parameter count: 1
|
|
bytecode array length: 46
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 53 S> */ B(LdaSmi), U8(1),
|
|
B(Star), R(1),
|
|
/* 56 E> */ B(StackCheck),
|
|
/* 63 S> */ B(LdaSmi), U8(10),
|
|
B(Mul), R(1), U8(2),
|
|
B(Star), R(1),
|
|
/* 77 S> */ B(LdaSmi), U8(5),
|
|
/* 83 E> */ B(TestEqual), R(0), U8(3),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 89 S> */ B(Jump), U8(20),
|
|
/* 98 S> */ B(AddSmi), U8(1), R(0), U8(4),
|
|
B(Star), R(0),
|
|
/* 111 S> */ B(LdaSmi), U8(6),
|
|
/* 117 E> */ B(TestEqual), R(0), U8(5),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 123 S> */ B(Jump), U8(2),
|
|
B(JumpLoop), U8(-32), U8(0),
|
|
/* 149 S> */ B(Ldar), R(1),
|
|
/* 159 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var x = 0;
|
|
for (;;) {
|
|
if (x == 1) break;
|
|
if (x == 2) continue;
|
|
x = x + 1;
|
|
}
|
|
"
|
|
frame size: 1
|
|
parameter count: 1
|
|
bytecode array length: 34
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 45 E> */ B(StackCheck),
|
|
/* 58 S> */ B(LdaSmi), U8(1),
|
|
/* 64 E> */ B(TestEqual), R(0), U8(2),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 70 S> */ B(Jump), U8(20),
|
|
/* 79 S> */ B(LdaSmi), U8(2),
|
|
/* 85 E> */ B(TestEqual), R(0), U8(3),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 91 S> */ B(Jump), U8(8),
|
|
/* 103 S> */ B(AddSmi), U8(1), R(0), U8(4),
|
|
B(Star), R(0),
|
|
B(JumpLoop), U8(-25), U8(0),
|
|
B(LdaUndefined),
|
|
/* 116 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
for (var x = 0;;) {
|
|
if (x == 1) break;
|
|
if (x == 2) continue;
|
|
x = x + 1;
|
|
}
|
|
"
|
|
frame size: 1
|
|
parameter count: 1
|
|
bytecode array length: 34
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 47 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 34 E> */ B(StackCheck),
|
|
/* 56 S> */ B(LdaSmi), U8(1),
|
|
/* 62 E> */ B(TestEqual), R(0), U8(2),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 68 S> */ B(Jump), U8(20),
|
|
/* 77 S> */ B(LdaSmi), U8(2),
|
|
/* 83 E> */ B(TestEqual), R(0), U8(3),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 89 S> */ B(Jump), U8(8),
|
|
/* 101 S> */ B(AddSmi), U8(1), R(0), U8(4),
|
|
B(Star), R(0),
|
|
B(JumpLoop), U8(-25), U8(0),
|
|
B(LdaUndefined),
|
|
/* 114 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var x = 0;
|
|
for (;; x = x + 1) {
|
|
if (x == 1) break;
|
|
if (x == 2) continue;
|
|
}
|
|
"
|
|
frame size: 1
|
|
parameter count: 1
|
|
bytecode array length: 34
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 45 E> */ B(StackCheck),
|
|
/* 68 S> */ B(LdaSmi), U8(1),
|
|
/* 74 E> */ B(TestEqual), R(0), U8(3),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 80 S> */ B(Jump), U8(20),
|
|
/* 89 S> */ B(LdaSmi), U8(2),
|
|
/* 95 E> */ B(TestEqual), R(0), U8(4),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 101 S> */ B(Jump), U8(2),
|
|
/* 55 S> */ B(AddSmi), U8(1), R(0), U8(2),
|
|
B(Star), R(0),
|
|
B(JumpLoop), U8(-25), U8(0),
|
|
B(LdaUndefined),
|
|
/* 113 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
for (var x = 0;; x = x + 1) {
|
|
if (x == 1) break;
|
|
if (x == 2) continue;
|
|
}
|
|
"
|
|
frame size: 1
|
|
parameter count: 1
|
|
bytecode array length: 34
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 47 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 34 E> */ B(StackCheck),
|
|
/* 66 S> */ B(LdaSmi), U8(1),
|
|
/* 72 E> */ B(TestEqual), R(0), U8(3),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 78 S> */ B(Jump), U8(20),
|
|
/* 87 S> */ B(LdaSmi), U8(2),
|
|
/* 93 E> */ B(TestEqual), R(0), U8(4),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 99 S> */ B(Jump), U8(2),
|
|
/* 53 S> */ B(AddSmi), U8(1), R(0), U8(2),
|
|
B(Star), R(0),
|
|
B(JumpLoop), U8(-25), U8(0),
|
|
B(LdaUndefined),
|
|
/* 111 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var u = 0;
|
|
for (var i = 0; i < 100; i = i + 1) {
|
|
u = u + 1;
|
|
continue;
|
|
}
|
|
"
|
|
frame size: 2
|
|
parameter count: 1
|
|
bytecode array length: 34
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 58 S> */ B(LdaZero),
|
|
B(Star), R(1),
|
|
/* 63 S> */ B(LdaSmi), U8(100),
|
|
/* 63 E> */ B(TestLessThan), R(1), U8(2),
|
|
B(JumpIfFalse), U8(20),
|
|
/* 45 E> */ B(StackCheck),
|
|
/* 85 S> */ B(AddSmi), U8(1), R(0), U8(4),
|
|
B(Star), R(0),
|
|
/* 98 S> */ B(Jump), U8(2),
|
|
/* 72 S> */ B(AddSmi), U8(1), R(1), U8(3),
|
|
B(Star), R(1),
|
|
B(JumpLoop), U8(-22), U8(0),
|
|
B(LdaUndefined),
|
|
/* 110 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var y = 1;
|
|
for (var x = 10; x; --x) {
|
|
y = y * 12;
|
|
}
|
|
return y;
|
|
"
|
|
frame size: 2
|
|
parameter count: 1
|
|
bytecode array length: 33
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaSmi), U8(1),
|
|
B(Star), R(0),
|
|
/* 58 S> */ B(LdaSmi), U8(10),
|
|
B(Star), R(1),
|
|
/* 62 S> */ B(Ldar), R(1),
|
|
B(JumpIfToBooleanFalse), U8(19),
|
|
/* 45 E> */ B(StackCheck),
|
|
/* 74 S> */ B(LdaSmi), U8(12),
|
|
B(Mul), R(0), U8(3),
|
|
B(Star), R(0),
|
|
/* 67 S> */ B(Ldar), R(1),
|
|
B(Dec), U8(2),
|
|
B(Star), R(1),
|
|
B(JumpLoop), U8(-18), U8(0),
|
|
/* 88 S> */ B(Ldar), R(0),
|
|
/* 98 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var x = 0;
|
|
for (var i = 0; false; i++) {
|
|
x = x + 1;
|
|
};
|
|
return x;
|
|
"
|
|
frame size: 2
|
|
parameter count: 1
|
|
bytecode array length: 10
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 58 S> */ B(LdaZero),
|
|
B(Star), R(1),
|
|
/* 91 S> */ B(Ldar), R(0),
|
|
/* 101 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var x = 0;
|
|
for (var i = 0; true; ++i) {
|
|
x = x + 1;
|
|
if (x == 20) break;
|
|
};
|
|
return x;
|
|
"
|
|
frame size: 2
|
|
parameter count: 1
|
|
bytecode array length: 35
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaZero),
|
|
B(Star), R(0),
|
|
/* 58 S> */ B(LdaZero),
|
|
B(Star), R(1),
|
|
/* 45 E> */ B(StackCheck),
|
|
/* 76 S> */ B(AddSmi), U8(1), R(0), U8(3),
|
|
B(Star), R(0),
|
|
/* 89 S> */ B(LdaSmi), U8(20),
|
|
/* 95 E> */ B(TestEqual), R(0), U8(4),
|
|
B(JumpIfFalse), U8(4),
|
|
/* 102 S> */ B(Jump), U8(11),
|
|
/* 69 S> */ B(Ldar), R(1),
|
|
B(Inc), U8(2),
|
|
B(Star), R(1),
|
|
B(JumpLoop), U8(-22), U8(0),
|
|
/* 112 S> */ B(Ldar), R(0),
|
|
/* 122 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
]
|
|
handlers: [
|
|
]
|
|
|
|
---
|
|
snippet: "
|
|
var a = 0;
|
|
while (a) {
|
|
{
|
|
let z = 1;
|
|
function f() { z = 2; }
|
|
if (z) continue;
|
|
z++;
|
|
}
|
|
}
|
|
"
|
|
frame size: 4
|
|
parameter count: 1
|
|
bytecode array length: 53
|
|
bytecodes: [
|
|
/* 30 E> */ B(StackCheck),
|
|
/* 42 S> */ B(LdaZero),
|
|
B(Star), R(1),
|
|
/* 52 S> */ B(Ldar), R(1),
|
|
B(JumpIfToBooleanFalse), U8(45),
|
|
/* 45 E> */ B(StackCheck),
|
|
B(Ldar), R(closure),
|
|
B(CreateBlockContext), U8(0),
|
|
B(PushContext), R(3),
|
|
B(LdaTheHole),
|
|
B(StaCurrentContextSlot), U8(4),
|
|
B(CreateClosure), U8(1), U8(2),
|
|
B(Star), R(0),
|
|
/* 73 S> */ B(LdaSmi), U8(1),
|
|
/* 73 E> */ B(StaCurrentContextSlot), U8(4),
|
|
B(Mov), R(0), R(2),
|
|
/* 106 S> */ B(LdaCurrentContextSlot), U8(4),
|
|
B(JumpIfToBooleanFalse), U8(8),
|
|
/* 113 S> */ B(PopContext), R(3),
|
|
B(PopContext), R(3),
|
|
B(Jump), U8(10),
|
|
/* 126 S> */ B(LdaCurrentContextSlot), U8(4),
|
|
B(Inc), U8(2),
|
|
/* 127 E> */ B(StaCurrentContextSlot), U8(4),
|
|
B(PopContext), R(3),
|
|
B(JumpLoop), U8(-44), U8(0),
|
|
B(LdaUndefined),
|
|
/* 137 S> */ B(Return),
|
|
]
|
|
constant pool: [
|
|
FIXED_ARRAY_TYPE,
|
|
SHARED_FUNCTION_INFO_TYPE,
|
|
]
|
|
handlers: [
|
|
]
|
|
|