v8/test/cctest/interpreter/bytecode_expectations/Switch.golden
oth e43fbde72b [Interpreter] Preserve source positions in peephole optimizer.
The original peephole optimizer logic in the BytecodeArrayBuilder did
not respect source positions as it was written before there were
bytecode source positions. This led to some minor differences to
FCG and was problematic when combined with pending bytecode
optimizations. This change makes the new peephole optimizer fully
respect source positions.

BUG=v8:4280
LOG=N

Review-Url: https://codereview.chromium.org/1998203002
Cr-Commit-Position: refs/heads/master@{#36439}
2016-05-23 13:33:20 +00:00

532 lines
12 KiB
Plaintext

#
# Autogenerated by generate-bytecode-expectations.
#
---
pool type: number
execute: yes
wrap: yes
---
snippet: "
var a = 1;
switch(a) {
case 1: return 2;
case 2: return 3;
}
"
frame size: 3
parameter count: 1
bytecode array length: 32
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(1),
/* 52 E> */ B(Nop),
B(Star), R(0),
/* 45 S> */ B(Star), R(2),
B(LdaSmi), U8(1),
B(TestEqualStrict), R(2),
B(JumpIfTrue), U8(10),
B(LdaSmi), U8(2),
B(TestEqualStrict), R(2),
B(JumpIfTrue), U8(7),
B(Jump), U8(8),
/* 66 S> */ B(LdaSmi), U8(2),
/* 97 S> */ B(Return),
/* 85 S> */ B(LdaSmi), U8(3),
/* 97 S> */ B(Return),
B(LdaUndefined),
/* 97 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var a = 1;
switch(a) {
case 1: a = 2; break;
case 2: a = 3; break;
}
"
frame size: 3
parameter count: 1
bytecode array length: 38
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(1),
/* 52 E> */ B(Nop),
B(Star), R(0),
/* 45 S> */ B(Star), R(2),
B(LdaSmi), U8(1),
B(TestEqualStrict), R(2),
B(JumpIfTrue), U8(10),
B(LdaSmi), U8(2),
B(TestEqualStrict), R(2),
B(JumpIfTrue), U8(10),
B(Jump), U8(14),
/* 66 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 73 S> */ B(Jump), U8(8),
/* 89 S> */ B(LdaSmi), U8(3),
B(Star), R(1),
/* 96 S> */ B(Jump), U8(2),
B(LdaUndefined),
/* 105 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var a = 1;
switch(a) {
case 1: a = 2; // fall-through
case 2: a = 3; break;
}
"
frame size: 3
parameter count: 1
bytecode array length: 36
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(1),
/* 52 E> */ B(Nop),
B(Star), R(0),
/* 45 S> */ B(Star), R(2),
B(LdaSmi), U8(1),
B(TestEqualStrict), R(2),
B(JumpIfTrue), U8(10),
B(LdaSmi), U8(2),
B(TestEqualStrict), R(2),
B(JumpIfTrue), U8(8),
B(Jump), U8(12),
/* 66 S> */ B(LdaSmi), U8(2),
/* 68 E> */ B(Star), R(1),
/* 98 S> */ B(LdaSmi), U8(3),
B(Star), R(1),
/* 105 S> */ B(Jump), U8(2),
B(LdaUndefined),
/* 114 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var a = 1;
switch(a) {
case 2: break;
case 3: break;
default: a = 1; break;
}
"
frame size: 3
parameter count: 1
bytecode array length: 36
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(1),
/* 52 E> */ B(Nop),
B(Star), R(0),
/* 45 S> */ B(Star), R(2),
B(LdaSmi), U8(2),
B(TestEqualStrict), R(2),
B(JumpIfTrue), U8(10),
B(LdaSmi), U8(3),
B(TestEqualStrict), R(2),
B(JumpIfTrue), U8(6),
B(Jump), U8(6),
/* 66 S> */ B(Jump), U8(10),
/* 82 S> */ B(Jump), U8(8),
/* 99 S> */ B(LdaSmi), U8(1),
B(Star), R(1),
/* 106 S> */ B(Jump), U8(2),
B(LdaUndefined),
/* 115 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var a = 1;
switch(typeof(a)) {
case 2: a = 1; break;
case 3: a = 2; break;
default: a = 3; break;
}
"
frame size: 3
parameter count: 1
bytecode array length: 44
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(1),
B(TypeOf),
B(Star), R(0),
/* 45 S> */ B(Star), R(2),
B(LdaSmi), U8(2),
B(TestEqualStrict), R(2),
B(JumpIfTrue), U8(10),
B(LdaSmi), U8(3),
B(TestEqualStrict), R(2),
B(JumpIfTrue), U8(10),
B(Jump), U8(14),
/* 74 S> */ B(LdaSmi), U8(1),
B(Star), R(1),
/* 81 S> */ B(Jump), U8(14),
/* 97 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 104 S> */ B(Jump), U8(8),
/* 121 S> */ B(LdaSmi), U8(3),
B(Star), R(1),
/* 128 S> */ B(Jump), U8(2),
B(LdaUndefined),
/* 137 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var a = 1;
switch(a) {
case typeof(a): a = 1; break;
default: a = 2; break;
}
"
frame size: 3
parameter count: 1
bytecode array length: 33
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(1),
/* 52 E> */ B(Nop),
B(Star), R(0),
/* 45 S> */ B(Star), R(2),
B(Ldar), R(1),
B(TypeOf),
B(TestEqualStrict), R(2),
B(JumpIfTrue), U8(4),
B(Jump), U8(8),
/* 74 S> */ B(LdaSmi), U8(1),
B(Star), R(1),
/* 81 S> */ B(Jump), U8(8),
/* 98 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 105 S> */ B(Jump), U8(2),
B(LdaUndefined),
/* 114 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
var a = 1;
switch(a) {
case 1:
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
a = 2;
break;
case 2:
a = 3;
break;
}
"
frame size: 3
parameter count: 1
bytecode array length: 290
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(1),
/* 52 E> */ B(Nop),
B(Star), R(0),
/* 45 S> */ B(Star), R(2),
B(LdaSmi), U8(1),
B(TestEqualStrict), R(2),
B(JumpIfTrue), U8(10),
B(LdaSmi), U8(2),
B(TestEqualStrict), R(2),
B(JumpIfTrueConstant), U8(0),
B(JumpConstant), U8(1),
/* 68 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 77 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 86 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 95 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 104 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 113 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 122 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 131 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 140 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 149 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 158 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 167 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 176 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 185 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 194 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 203 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 212 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 221 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 230 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 239 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 248 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 257 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 266 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 275 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 284 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 293 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 302 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 311 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 320 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 329 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 338 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 347 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 356 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 365 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 374 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 383 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 392 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 401 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 410 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 419 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 428 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 437 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 446 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 455 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 464 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 473 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 482 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 491 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 500 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 509 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 518 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 527 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 536 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 545 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 554 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 563 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 572 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 581 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 590 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 599 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 608 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 617 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 626 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 635 S> */ B(LdaSmi), U8(2),
B(Star), R(1),
/* 644 S> */ B(Jump), U8(8),
/* 662 S> */ B(LdaSmi), U8(3),
B(Star), R(1),
/* 671 S> */ B(Jump), U8(2),
B(LdaUndefined),
/* 680 S> */ B(Return),
]
constant pool: [
262,
266,
]
handlers: [
]
---
snippet: "
var a = 1;
switch(a) {
case 1:
switch(a + 1) {
case 2 : a = 1; break;
default : a = 2; break;
} // fall-through
case 2: a = 3;
}
"
frame size: 5
parameter count: 1
bytecode array length: 62
bytecodes: [
/* 30 E> */ B(StackCheck),
/* 42 S> */ B(LdaSmi), U8(1),
/* 42 E> */ B(Star), R(2),
/* 52 E> */ B(Nop),
B(Star), R(0),
/* 45 S> */ B(Star), R(3),
B(LdaSmi), U8(1),
B(TestEqualStrict), R(3),
B(JumpIfTrue), U8(10),
B(LdaSmi), U8(2),
B(TestEqualStrict), R(3),
B(JumpIfTrue), U8(36),
B(Jump), U8(38),
/* 77 E> */ B(Ldar), R(2),
B(Star), R(4),
B(LdaSmi), U8(1),
B(Add), R(4),
B(Star), R(1),
/* 70 S> */ B(Star), R(4),
B(LdaSmi), U8(2),
B(TestEqualStrict), R(4),
B(JumpIfTrue), U8(4),
B(Jump), U8(8),
/* 101 S> */ B(LdaSmi), U8(1),
B(Star), R(2),
/* 108 S> */ B(Jump), U8(8),
/* 131 S> */ B(LdaSmi), U8(2),
B(Star), R(2),
/* 138 S> */ B(Jump), U8(2),
/* 176 S> */ B(LdaSmi), U8(3),
/* 178 E> */ B(Star), R(2),
B(LdaUndefined),
/* 185 S> */ B(Return),
]
constant pool: [
]
handlers: [
]