v8/test/cctest/interpreter/bytecode_expectations/IfConditions.golden
Ross McIlroy 11a211ff1b Reland: [TypeFeedbackVector] Store optimized code in the vector
Since the feedback vector is itself a native context structure, why
not store optimized code for a function in there rather than in
a map from native context to code? This allows us to get rid of
the optimized code map in the SharedFunctionInfo, saving a pointer,
and making lookup of any optimized code quicker.

Original patch by Michael Stanton <mvstanton@chromium.org>

BUG=v8:6246,chromium:718891
TBR=yangguo@chromium.org,ulan@chromium.org

Change-Id: I3bb9ec0cfff32e667cca0e1403f964f33a6958a6
Reviewed-on: https://chromium-review.googlesource.com/500134
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45234}
2017-05-10 15:04:35 +00:00

780 lines
16 KiB
Plaintext

#
# Autogenerated by generate-bytecode-expectations.
#
---
wrap: no
test function name: f
---
snippet: "
function f() {
if (0) {
return 1;
} else {
return -1;
}
};
f();
"
frame size: 0
parameter count: 1
bytecode array length: 4
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 55 S> */ B(LdaSmi), I8(-1),
/* 70 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function f() {
if ('lucky') {
return 1;
} else {
return -1;
}
};
f();
"
frame size: 0
parameter count: 1
bytecode array length: 4
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 36 S> */ B(LdaSmi), I8(1),
/* 76 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function f() {
if (false) {
return 1;
} else {
return -1;
}
};
f();
"
frame size: 0
parameter count: 1
bytecode array length: 4
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 59 S> */ B(LdaSmi), I8(-1),
/* 74 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function f() {
if (false) {
return 1;
}
};
f();
"
frame size: 0
parameter count: 1
bytecode array length: 3
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 17 S> */ B(LdaUndefined),
/* 48 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function f() {
var a = 1;
if (a) {
a += 1;
} else {
return 2;
}
};
f();
"
frame size: 1
parameter count: 1
bytecode array length: 21
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 25 S> */ B(LdaSmi), I8(1),
B(Star), R(0),
/* 30 S> */ B(JumpIfToBooleanFalse), U8(11),
/* 43 S> */ B(Ldar), R(0),
B(AddSmi), I8(1), U8(3),
B(Star), R(0),
B(Jump), U8(5),
/* 66 S> */ B(LdaSmi), I8(2),
/* 80 S> */ B(Return),
B(LdaUndefined),
/* 80 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function f(a) {
if (a <= 0) {
return 200;
} else {
return -200;
}
};
f(99);
"
frame size: 0
parameter count: 2
bytecode array length: 19
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 18 S> */ B(LdaZero),
/* 24 E> */ B(TestLessThanOrEqual), R(arg0), U8(3),
B(JumpIfFalse), U8(7),
/* 36 S> */ B(Wide), B(LdaSmi), I16(200),
/* 80 S> */ B(Return),
/* 63 S> */ B(Wide), B(LdaSmi), I16(-200),
/* 80 S> */ B(Return),
B(LdaUndefined),
/* 80 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function f(a, b) { if (a in b) { return 200; } }f('prop', { prop: 'yes'});
"
frame size: 0
parameter count: 3
bytecode array length: 14
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 19 S> */ B(Ldar), R(arg1),
/* 25 E> */ B(TestIn), R(arg0),
B(JumpIfFalse), U8(7),
/* 33 S> */ B(Wide), B(LdaSmi), I16(200),
/* 47 S> */ B(Return),
B(LdaUndefined),
/* 47 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function f(z) { var a = 0; var b = 0; if (a === 0.01) {
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
return 200; } else { return -200; } } f(0.001);
"
frame size: 2
parameter count: 2
bytecode array length: 156
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 24 S> */ B(LdaZero),
B(Star), R(0),
/* 35 S> */ B(LdaZero),
B(Star), R(1),
/* 38 S> */ B(LdaConstant), U8(0),
/* 44 E> */ B(TestEqualStrict), R(0), U8(3),
B(JumpIfFalse), U8(137),
/* 58 S> */ B(Mov), R(0), R(1),
/* 65 S> */ B(Nop),
/* 74 S> */ B(Nop),
/* 81 S> */ B(Nop),
/* 90 S> */ B(Nop),
/* 97 S> */ B(Nop),
/* 106 S> */ B(Nop),
/* 113 S> */ B(Nop),
/* 122 S> */ B(Nop),
/* 129 S> */ B(Nop),
/* 138 S> */ B(Nop),
/* 145 S> */ B(Nop),
/* 154 S> */ B(Nop),
/* 161 S> */ B(Nop),
/* 170 S> */ B(Nop),
/* 177 S> */ B(Nop),
/* 186 S> */ B(Nop),
/* 193 S> */ B(Nop),
/* 202 S> */ B(Nop),
/* 209 S> */ B(Nop),
/* 218 S> */ B(Nop),
/* 225 S> */ B(Nop),
/* 234 S> */ B(Nop),
/* 241 S> */ B(Nop),
/* 250 S> */ B(Nop),
/* 257 S> */ B(Nop),
/* 266 S> */ B(Nop),
/* 273 S> */ B(Nop),
/* 282 S> */ B(Nop),
/* 289 S> */ B(Nop),
/* 298 S> */ B(Nop),
/* 305 S> */ B(Nop),
/* 314 S> */ B(Nop),
/* 321 S> */ B(Nop),
/* 330 S> */ B(Nop),
/* 337 S> */ B(Nop),
/* 346 S> */ B(Nop),
/* 353 S> */ B(Nop),
/* 362 S> */ B(Nop),
/* 369 S> */ B(Nop),
/* 378 S> */ B(Nop),
/* 385 S> */ B(Nop),
/* 394 S> */ B(Nop),
/* 401 S> */ B(Nop),
/* 410 S> */ B(Nop),
/* 417 S> */ B(Nop),
/* 426 S> */ B(Nop),
/* 433 S> */ B(Nop),
/* 442 S> */ B(Nop),
/* 449 S> */ B(Nop),
/* 458 S> */ B(Nop),
/* 465 S> */ B(Nop),
/* 474 S> */ B(Nop),
/* 481 S> */ B(Nop),
/* 490 S> */ B(Nop),
/* 497 S> */ B(Nop),
/* 506 S> */ B(Nop),
/* 513 S> */ B(Nop),
/* 522 S> */ B(Nop),
/* 529 S> */ B(Nop),
/* 538 S> */ B(Nop),
/* 545 S> */ B(Nop),
/* 554 S> */ B(Nop),
/* 561 S> */ B(Nop),
/* 570 S> */ B(Nop),
/* 577 S> */ B(Nop),
/* 586 S> */ B(Nop),
/* 593 S> */ B(Nop),
/* 602 S> */ B(Nop),
/* 609 S> */ B(Nop),
/* 618 S> */ B(Nop),
/* 625 S> */ B(Nop),
/* 634 S> */ B(Nop),
/* 641 S> */ B(Nop),
/* 650 S> */ B(Nop),
/* 657 S> */ B(Nop),
/* 666 S> */ B(Nop),
/* 673 S> */ B(Nop),
/* 682 S> */ B(Nop),
/* 689 S> */ B(Nop),
/* 698 S> */ B(Nop),
/* 705 S> */ B(Nop),
/* 714 S> */ B(Nop),
/* 721 S> */ B(Nop),
/* 730 S> */ B(Nop),
/* 737 S> */ B(Nop),
/* 746 S> */ B(Nop),
/* 753 S> */ B(Nop),
/* 762 S> */ B(Nop),
/* 769 S> */ B(Nop),
/* 778 S> */ B(Nop),
/* 785 S> */ B(Nop),
/* 794 S> */ B(Nop),
/* 801 S> */ B(Nop),
/* 810 S> */ B(Nop),
/* 817 S> */ B(Nop),
/* 826 S> */ B(Nop),
/* 833 S> */ B(Nop),
/* 842 S> */ B(Nop),
/* 849 S> */ B(Nop),
/* 858 S> */ B(Nop),
/* 865 S> */ B(Nop),
/* 874 S> */ B(Nop),
/* 881 S> */ B(Nop),
/* 890 S> */ B(Nop),
/* 897 S> */ B(Nop),
/* 906 S> */ B(Nop),
/* 913 S> */ B(Nop),
/* 922 S> */ B(Nop),
/* 929 S> */ B(Nop),
/* 938 S> */ B(Nop),
/* 945 S> */ B(Nop),
/* 954 S> */ B(Nop),
/* 961 S> */ B(Nop),
/* 970 S> */ B(Nop),
/* 977 S> */ B(Nop),
/* 986 S> */ B(Nop),
/* 993 S> */ B(Nop),
/* 1002 S> */ B(Nop),
/* 1009 S> */ B(Nop),
/* 1018 S> */ B(Nop),
/* 1025 S> */ B(Nop),
/* 1034 S> */ B(Nop),
/* 1041 S> */ B(Nop),
/* 1050 S> */ B(Nop),
/* 1057 S> */ B(Nop),
/* 1066 S> */ B(Nop),
/* 1073 S> */ B(Nop),
/* 1081 S> */ B(Wide), B(LdaSmi), I16(200),
/* 1117 S> */ B(Return),
/* 1102 S> */ B(Wide), B(LdaSmi), I16(-200),
/* 1117 S> */ B(Return),
B(LdaUndefined),
/* 1117 S> */ B(Return),
]
constant pool: [
HEAP_NUMBER_TYPE [0.01],
]
handlers: [
]
---
snippet: "
function f() {
var a = 0; var b = 0;
if (a) {
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
b = a; a = b;
return 200; } else { return -200; }
};
f();
"
frame size: 2
parameter count: 1
bytecode array length: 153
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 25 S> */ B(LdaZero),
B(Star), R(0),
/* 36 S> */ B(LdaZero),
B(Star), R(1),
/* 41 S> */ B(Ldar), R(0),
B(JumpIfToBooleanFalse), U8(137),
/* 52 S> */ B(Mov), R(0), R(1),
/* 59 S> */ B(Nop),
/* 68 S> */ B(Nop),
/* 75 S> */ B(Nop),
/* 84 S> */ B(Nop),
/* 91 S> */ B(Nop),
/* 100 S> */ B(Nop),
/* 107 S> */ B(Nop),
/* 116 S> */ B(Nop),
/* 123 S> */ B(Nop),
/* 132 S> */ B(Nop),
/* 139 S> */ B(Nop),
/* 148 S> */ B(Nop),
/* 155 S> */ B(Nop),
/* 164 S> */ B(Nop),
/* 171 S> */ B(Nop),
/* 180 S> */ B(Nop),
/* 187 S> */ B(Nop),
/* 196 S> */ B(Nop),
/* 203 S> */ B(Nop),
/* 212 S> */ B(Nop),
/* 219 S> */ B(Nop),
/* 228 S> */ B(Nop),
/* 235 S> */ B(Nop),
/* 244 S> */ B(Nop),
/* 251 S> */ B(Nop),
/* 260 S> */ B(Nop),
/* 267 S> */ B(Nop),
/* 276 S> */ B(Nop),
/* 283 S> */ B(Nop),
/* 292 S> */ B(Nop),
/* 299 S> */ B(Nop),
/* 308 S> */ B(Nop),
/* 315 S> */ B(Nop),
/* 324 S> */ B(Nop),
/* 331 S> */ B(Nop),
/* 340 S> */ B(Nop),
/* 347 S> */ B(Nop),
/* 356 S> */ B(Nop),
/* 363 S> */ B(Nop),
/* 372 S> */ B(Nop),
/* 379 S> */ B(Nop),
/* 388 S> */ B(Nop),
/* 395 S> */ B(Nop),
/* 404 S> */ B(Nop),
/* 411 S> */ B(Nop),
/* 420 S> */ B(Nop),
/* 427 S> */ B(Nop),
/* 436 S> */ B(Nop),
/* 443 S> */ B(Nop),
/* 452 S> */ B(Nop),
/* 459 S> */ B(Nop),
/* 468 S> */ B(Nop),
/* 475 S> */ B(Nop),
/* 484 S> */ B(Nop),
/* 491 S> */ B(Nop),
/* 500 S> */ B(Nop),
/* 507 S> */ B(Nop),
/* 516 S> */ B(Nop),
/* 523 S> */ B(Nop),
/* 532 S> */ B(Nop),
/* 539 S> */ B(Nop),
/* 548 S> */ B(Nop),
/* 555 S> */ B(Nop),
/* 564 S> */ B(Nop),
/* 571 S> */ B(Nop),
/* 580 S> */ B(Nop),
/* 587 S> */ B(Nop),
/* 596 S> */ B(Nop),
/* 603 S> */ B(Nop),
/* 612 S> */ B(Nop),
/* 619 S> */ B(Nop),
/* 628 S> */ B(Nop),
/* 635 S> */ B(Nop),
/* 644 S> */ B(Nop),
/* 651 S> */ B(Nop),
/* 660 S> */ B(Nop),
/* 667 S> */ B(Nop),
/* 676 S> */ B(Nop),
/* 683 S> */ B(Nop),
/* 692 S> */ B(Nop),
/* 699 S> */ B(Nop),
/* 708 S> */ B(Nop),
/* 715 S> */ B(Nop),
/* 724 S> */ B(Nop),
/* 731 S> */ B(Nop),
/* 740 S> */ B(Nop),
/* 747 S> */ B(Nop),
/* 756 S> */ B(Nop),
/* 763 S> */ B(Nop),
/* 772 S> */ B(Nop),
/* 779 S> */ B(Nop),
/* 788 S> */ B(Nop),
/* 795 S> */ B(Nop),
/* 804 S> */ B(Nop),
/* 811 S> */ B(Nop),
/* 820 S> */ B(Nop),
/* 827 S> */ B(Nop),
/* 836 S> */ B(Nop),
/* 843 S> */ B(Nop),
/* 852 S> */ B(Nop),
/* 859 S> */ B(Nop),
/* 868 S> */ B(Nop),
/* 875 S> */ B(Nop),
/* 884 S> */ B(Nop),
/* 891 S> */ B(Nop),
/* 900 S> */ B(Nop),
/* 907 S> */ B(Nop),
/* 916 S> */ B(Nop),
/* 923 S> */ B(Nop),
/* 932 S> */ B(Nop),
/* 939 S> */ B(Nop),
/* 948 S> */ B(Nop),
/* 955 S> */ B(Nop),
/* 964 S> */ B(Nop),
/* 971 S> */ B(Nop),
/* 980 S> */ B(Nop),
/* 987 S> */ B(Nop),
/* 996 S> */ B(Nop),
/* 1003 S> */ B(Nop),
/* 1012 S> */ B(Nop),
/* 1019 S> */ B(Nop),
/* 1028 S> */ B(Nop),
/* 1035 S> */ B(Nop),
/* 1044 S> */ B(Nop),
/* 1051 S> */ B(Nop),
/* 1060 S> */ B(Nop),
/* 1067 S> */ B(Nop),
/* 1076 S> */ B(Wide), B(LdaSmi), I16(200),
/* 1112 S> */ B(Return),
/* 1097 S> */ B(Wide), B(LdaSmi), I16(-200),
/* 1112 S> */ B(Return),
B(LdaUndefined),
/* 1112 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function f(a, b) {
if (a == b) { return 1; }
if (a === b) { return 1; }
if (a < b) { return 1; }
if (a > b) { return 1; }
if (a <= b) { return 1; }
if (a >= b) { return 1; }
if (a in b) { return 1; }
if (a instanceof b) { return 1; }
return 0;
}
f(1, 1);
"
frame size: 0
parameter count: 3
bytecode array length: 81
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 21 S> */ B(Ldar), R(arg1),
/* 27 E> */ B(TestEqual), R(arg0), U8(3),
B(JumpIfFalse), U8(5),
/* 35 S> */ B(LdaSmi), I8(1),
/* 262 S> */ B(Return),
/* 49 S> */ B(Ldar), R(arg1),
/* 55 E> */ B(TestEqualStrict), R(arg0), U8(4),
B(JumpIfFalse), U8(5),
/* 64 S> */ B(LdaSmi), I8(1),
/* 262 S> */ B(Return),
/* 78 S> */ B(Ldar), R(arg1),
/* 84 E> */ B(TestLessThan), R(arg0), U8(5),
B(JumpIfFalse), U8(5),
/* 91 S> */ B(LdaSmi), I8(1),
/* 262 S> */ B(Return),
/* 105 S> */ B(Ldar), R(arg1),
/* 111 E> */ B(TestGreaterThan), R(arg0), U8(6),
B(JumpIfFalse), U8(5),
/* 118 S> */ B(LdaSmi), I8(1),
/* 262 S> */ B(Return),
/* 132 S> */ B(Ldar), R(arg1),
/* 138 E> */ B(TestLessThanOrEqual), R(arg0), U8(7),
B(JumpIfFalse), U8(5),
/* 146 S> */ B(LdaSmi), I8(1),
/* 262 S> */ B(Return),
/* 160 S> */ B(Ldar), R(arg1),
/* 166 E> */ B(TestGreaterThanOrEqual), R(arg0), U8(8),
B(JumpIfFalse), U8(5),
/* 174 S> */ B(LdaSmi), I8(1),
/* 262 S> */ B(Return),
/* 188 S> */ B(Ldar), R(arg1),
/* 194 E> */ B(TestIn), R(arg0),
B(JumpIfFalse), U8(5),
/* 202 S> */ B(LdaSmi), I8(1),
/* 262 S> */ B(Return),
/* 216 S> */ B(Ldar), R(arg1),
/* 222 E> */ B(TestInstanceOf), R(arg0),
B(JumpIfFalse), U8(5),
/* 238 S> */ B(LdaSmi), I8(1),
/* 262 S> */ B(Return),
/* 252 S> */ B(LdaZero),
/* 262 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function f() {
var a = 0;
if (a) {
return 20;
} else {
return -20;
}
};
f();
"
frame size: 1
parameter count: 1
bytecode array length: 14
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 25 S> */ B(LdaZero),
B(Star), R(0),
/* 30 S> */ B(JumpIfToBooleanFalse), U8(5),
/* 43 S> */ B(LdaSmi), I8(20),
/* 85 S> */ B(Return),
/* 69 S> */ B(LdaSmi), I8(-20),
/* 85 S> */ B(Return),
B(LdaUndefined),
/* 85 S> */ B(Return),
]
constant pool: [
]
handlers: [
]
---
snippet: "
function f(a, b) {
if (a == b || a < 0) {
return 1;
} else if (a > 0 && b > 0) {
return 0;
} else {
return -1;
}
};
f(-1, 1);
"
frame size: 0
parameter count: 3
bytecode array length: 36
bytecodes: [
/* 10 E> */ B(StackCheck),
/* 21 S> */ B(Ldar), R(arg1),
/* 27 E> */ B(TestEqual), R(arg0), U8(3),
B(JumpIfTrue), U8(8),
B(LdaZero),
/* 37 E> */ B(TestLessThan), R(arg0), U8(4),
B(JumpIfFalse), U8(5),
/* 48 S> */ B(LdaSmi), I8(1),
/* 133 S> */ B(Return),
/* 67 S> */ B(LdaZero),
/* 73 E> */ B(TestGreaterThan), R(arg0), U8(5),
B(JumpIfFalse), U8(10),
B(LdaZero),
/* 82 E> */ B(TestGreaterThan), R(arg1), U8(6),
B(JumpIfFalse), U8(4),
/* 93 S> */ B(LdaZero),
/* 133 S> */ B(Return),
/* 118 S> */ B(LdaSmi), I8(-1),
/* 133 S> */ B(Return),
B(LdaUndefined),
/* 133 S> */ B(Return),
]
constant pool: [
]
handlers: [
]