OLD | NEW |
1 # | 1 # |
2 # Autogenerated by generate-bytecode-expectations. | 2 # Autogenerated by generate-bytecode-expectations. |
3 # | 3 # |
4 | 4 |
5 --- | 5 --- |
6 wrap: no | 6 wrap: no |
7 test function name: f | 7 test function name: f |
8 | 8 |
9 --- | 9 --- |
10 snippet: " | 10 snippet: " |
11 function f() { | 11 function f() { |
12 if (0) { | 12 if (0) { |
13 return 1; | 13 return 1; |
14 } else { | 14 } else { |
15 return -1; | 15 return -1; |
16 } | 16 } |
17 }; | 17 }; |
18 f(); | 18 f(); |
19 " | 19 " |
20 frame size: 0 | 20 frame size: 0 |
21 parameter count: 1 | 21 parameter count: 1 |
22 bytecode array length: 4 | 22 bytecode array length: 4 |
23 bytecodes: [ | 23 bytecodes: [ |
24 /* 10 E> */ B(StackCheck), | 24 /* 10 E> */ B(StackCheck), |
25 /* 55 S> */ B(LdaSmi), U8(-1), | 25 /* 55 S> */ B(LdaSmi), I8(-1), |
26 /* 70 S> */ B(Return), | 26 /* 70 S> */ B(Return), |
27 ] | 27 ] |
28 constant pool: [ | 28 constant pool: [ |
29 ] | 29 ] |
30 handlers: [ | 30 handlers: [ |
31 ] | 31 ] |
32 | 32 |
33 --- | 33 --- |
34 snippet: " | 34 snippet: " |
35 function f() { | 35 function f() { |
36 if ('lucky') { | 36 if ('lucky') { |
37 return 1; | 37 return 1; |
38 } else { | 38 } else { |
39 return -1; | 39 return -1; |
40 } | 40 } |
41 }; | 41 }; |
42 f(); | 42 f(); |
43 " | 43 " |
44 frame size: 0 | 44 frame size: 0 |
45 parameter count: 1 | 45 parameter count: 1 |
46 bytecode array length: 4 | 46 bytecode array length: 4 |
47 bytecodes: [ | 47 bytecodes: [ |
48 /* 10 E> */ B(StackCheck), | 48 /* 10 E> */ B(StackCheck), |
49 /* 36 S> */ B(LdaSmi), U8(1), | 49 /* 36 S> */ B(LdaSmi), I8(1), |
50 /* 76 S> */ B(Return), | 50 /* 76 S> */ B(Return), |
51 ] | 51 ] |
52 constant pool: [ | 52 constant pool: [ |
53 ] | 53 ] |
54 handlers: [ | 54 handlers: [ |
55 ] | 55 ] |
56 | 56 |
57 --- | 57 --- |
58 snippet: " | 58 snippet: " |
59 function f() { | 59 function f() { |
60 if (false) { | 60 if (false) { |
61 return 1; | 61 return 1; |
62 } else { | 62 } else { |
63 return -1; | 63 return -1; |
64 } | 64 } |
65 }; | 65 }; |
66 f(); | 66 f(); |
67 " | 67 " |
68 frame size: 0 | 68 frame size: 0 |
69 parameter count: 1 | 69 parameter count: 1 |
70 bytecode array length: 4 | 70 bytecode array length: 4 |
71 bytecodes: [ | 71 bytecodes: [ |
72 /* 10 E> */ B(StackCheck), | 72 /* 10 E> */ B(StackCheck), |
73 /* 59 S> */ B(LdaSmi), U8(-1), | 73 /* 59 S> */ B(LdaSmi), I8(-1), |
74 /* 74 S> */ B(Return), | 74 /* 74 S> */ B(Return), |
75 ] | 75 ] |
76 constant pool: [ | 76 constant pool: [ |
77 ] | 77 ] |
78 handlers: [ | 78 handlers: [ |
79 ] | 79 ] |
80 | 80 |
81 --- | 81 --- |
82 snippet: " | 82 snippet: " |
83 function f() { | 83 function f() { |
(...skipping 26 matching lines...) Expand all Loading... |
110 return 2; | 110 return 2; |
111 } | 111 } |
112 }; | 112 }; |
113 f(); | 113 f(); |
114 " | 114 " |
115 frame size: 2 | 115 frame size: 2 |
116 parameter count: 1 | 116 parameter count: 1 |
117 bytecode array length: 23 | 117 bytecode array length: 23 |
118 bytecodes: [ | 118 bytecodes: [ |
119 /* 10 E> */ B(StackCheck), | 119 /* 10 E> */ B(StackCheck), |
120 /* 25 S> */ B(LdaSmi), U8(1), | 120 /* 25 S> */ B(LdaSmi), I8(1), |
121 B(Star), R(0), | 121 B(Star), R(0), |
122 /* 30 S> */ B(JumpIfToBooleanFalse), U8(13), | 122 /* 30 S> */ B(JumpIfToBooleanFalse), U8(13), |
123 /* 43 S> */ B(AddSmi), U8(1), R(0), U8(2), | 123 /* 43 S> */ B(AddSmi), I8(1), R(0), U8(2), |
124 B(Mov), R(0), R(1), | 124 B(Mov), R(0), R(1), |
125 B(Star), R(0), | 125 B(Star), R(0), |
126 B(Jump), U8(5), | 126 B(Jump), U8(5), |
127 /* 66 S> */ B(LdaSmi), U8(2), | 127 /* 66 S> */ B(LdaSmi), I8(2), |
128 /* 80 S> */ B(Return), | 128 /* 80 S> */ B(Return), |
129 B(LdaUndefined), | 129 B(LdaUndefined), |
130 /* 80 S> */ B(Return), | 130 /* 80 S> */ B(Return), |
131 ] | 131 ] |
132 constant pool: [ | 132 constant pool: [ |
133 ] | 133 ] |
134 handlers: [ | 134 handlers: [ |
135 ] | 135 ] |
136 | 136 |
137 --- | 137 --- |
138 snippet: " | 138 snippet: " |
139 function f(a) { | 139 function f(a) { |
140 if (a <= 0) { | 140 if (a <= 0) { |
141 return 200; | 141 return 200; |
142 } else { | 142 } else { |
143 return -200; | 143 return -200; |
144 } | 144 } |
145 }; | 145 }; |
146 f(99); | 146 f(99); |
147 " | 147 " |
148 frame size: 0 | 148 frame size: 0 |
149 parameter count: 2 | 149 parameter count: 2 |
150 bytecode array length: 19 | 150 bytecode array length: 19 |
151 bytecodes: [ | 151 bytecodes: [ |
152 /* 10 E> */ B(StackCheck), | 152 /* 10 E> */ B(StackCheck), |
153 /* 18 S> */ B(LdaZero), | 153 /* 18 S> */ B(LdaZero), |
154 /* 24 E> */ B(TestLessThanOrEqual), R(arg0), U8(2), | 154 /* 24 E> */ B(TestLessThanOrEqual), R(arg0), U8(2), |
155 B(JumpIfFalse), U8(7), | 155 B(JumpIfFalse), U8(7), |
156 /* 36 S> */ B(Wide), B(LdaSmi), U16(200), | 156 /* 36 S> */ B(Wide), B(LdaSmi), I16(200), |
157 /* 80 S> */ B(Return), | 157 /* 80 S> */ B(Return), |
158 /* 63 S> */ B(Wide), B(LdaSmi), U16(-200), | 158 /* 63 S> */ B(Wide), B(LdaSmi), I16(-200), |
159 /* 80 S> */ B(Return), | 159 /* 80 S> */ B(Return), |
160 B(LdaUndefined), | 160 B(LdaUndefined), |
161 /* 80 S> */ B(Return), | 161 /* 80 S> */ B(Return), |
162 ] | 162 ] |
163 constant pool: [ | 163 constant pool: [ |
164 ] | 164 ] |
165 handlers: [ | 165 handlers: [ |
166 ] | 166 ] |
167 | 167 |
168 --- | 168 --- |
169 snippet: " | 169 snippet: " |
170 function f(a, b) { if (a in b) { return 200; } }f('prop', { prop: 'yes'}); | 170 function f(a, b) { if (a in b) { return 200; } }f('prop', { prop: 'yes'}); |
171 " | 171 " |
172 frame size: 0 | 172 frame size: 0 |
173 parameter count: 3 | 173 parameter count: 3 |
174 bytecode array length: 14 | 174 bytecode array length: 14 |
175 bytecodes: [ | 175 bytecodes: [ |
176 /* 10 E> */ B(StackCheck), | 176 /* 10 E> */ B(StackCheck), |
177 /* 19 S> */ B(Ldar), R(arg1), | 177 /* 19 S> */ B(Ldar), R(arg1), |
178 /* 25 E> */ B(TestIn), R(arg0), | 178 /* 25 E> */ B(TestIn), R(arg0), |
179 B(JumpIfFalse), U8(7), | 179 B(JumpIfFalse), U8(7), |
180 /* 33 S> */ B(Wide), B(LdaSmi), U16(200), | 180 /* 33 S> */ B(Wide), B(LdaSmi), I16(200), |
181 /* 47 S> */ B(Return), | 181 /* 47 S> */ B(Return), |
182 B(LdaUndefined), | 182 B(LdaUndefined), |
183 /* 47 S> */ B(Return), | 183 /* 47 S> */ B(Return), |
184 ] | 184 ] |
185 constant pool: [ | 185 constant pool: [ |
186 ] | 186 ] |
187 handlers: [ | 187 handlers: [ |
188 ] | 188 ] |
189 | 189 |
190 --- | 190 --- |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 /* 1002 S> */ B(Mov), R(0), R(1), | 389 /* 1002 S> */ B(Mov), R(0), R(1), |
390 /* 1009 S> */ B(Mov), R(1), R(0), | 390 /* 1009 S> */ B(Mov), R(1), R(0), |
391 /* 1018 S> */ B(Mov), R(0), R(1), | 391 /* 1018 S> */ B(Mov), R(0), R(1), |
392 /* 1025 S> */ B(Mov), R(1), R(0), | 392 /* 1025 S> */ B(Mov), R(1), R(0), |
393 /* 1034 S> */ B(Mov), R(0), R(1), | 393 /* 1034 S> */ B(Mov), R(0), R(1), |
394 /* 1041 S> */ B(Mov), R(1), R(0), | 394 /* 1041 S> */ B(Mov), R(1), R(0), |
395 /* 1050 S> */ B(Mov), R(0), R(1), | 395 /* 1050 S> */ B(Mov), R(0), R(1), |
396 /* 1057 S> */ B(Mov), R(1), R(0), | 396 /* 1057 S> */ B(Mov), R(1), R(0), |
397 /* 1066 S> */ B(Mov), R(0), R(1), | 397 /* 1066 S> */ B(Mov), R(0), R(1), |
398 /* 1073 S> */ B(Mov), R(1), R(0), | 398 /* 1073 S> */ B(Mov), R(1), R(0), |
399 /* 1081 S> */ B(Wide), B(LdaSmi), U16(200), | 399 /* 1081 S> */ B(Wide), B(LdaSmi), I16(200), |
400 /* 1117 S> */ B(Return), | 400 /* 1117 S> */ B(Return), |
401 /* 1102 S> */ B(Wide), B(LdaSmi), U16(-200), | 401 /* 1102 S> */ B(Wide), B(LdaSmi), I16(-200), |
402 /* 1117 S> */ B(Return), | 402 /* 1117 S> */ B(Return), |
403 B(LdaUndefined), | 403 B(LdaUndefined), |
404 /* 1117 S> */ B(Return), | 404 /* 1117 S> */ B(Return), |
405 ] | 405 ] |
406 constant pool: [ | 406 constant pool: [ |
407 HEAP_NUMBER_TYPE [0.01], | 407 HEAP_NUMBER_TYPE [0.01], |
408 Smi [391], | 408 Smi [391], |
409 ] | 409 ] |
410 handlers: [ | 410 handlers: [ |
411 ] | 411 ] |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 /* 996 S> */ B(Mov), R(0), R(1), | 615 /* 996 S> */ B(Mov), R(0), R(1), |
616 /* 1003 S> */ B(Mov), R(1), R(0), | 616 /* 1003 S> */ B(Mov), R(1), R(0), |
617 /* 1012 S> */ B(Mov), R(0), R(1), | 617 /* 1012 S> */ B(Mov), R(0), R(1), |
618 /* 1019 S> */ B(Mov), R(1), R(0), | 618 /* 1019 S> */ B(Mov), R(1), R(0), |
619 /* 1028 S> */ B(Mov), R(0), R(1), | 619 /* 1028 S> */ B(Mov), R(0), R(1), |
620 /* 1035 S> */ B(Mov), R(1), R(0), | 620 /* 1035 S> */ B(Mov), R(1), R(0), |
621 /* 1044 S> */ B(Mov), R(0), R(1), | 621 /* 1044 S> */ B(Mov), R(0), R(1), |
622 /* 1051 S> */ B(Mov), R(1), R(0), | 622 /* 1051 S> */ B(Mov), R(1), R(0), |
623 /* 1060 S> */ B(Mov), R(0), R(1), | 623 /* 1060 S> */ B(Mov), R(0), R(1), |
624 /* 1067 S> */ B(Mov), R(1), R(0), | 624 /* 1067 S> */ B(Mov), R(1), R(0), |
625 /* 1076 S> */ B(Wide), B(LdaSmi), U16(200), | 625 /* 1076 S> */ B(Wide), B(LdaSmi), I16(200), |
626 /* 1112 S> */ B(Return), | 626 /* 1112 S> */ B(Return), |
627 /* 1097 S> */ B(Wide), B(LdaSmi), U16(-200), | 627 /* 1097 S> */ B(Wide), B(LdaSmi), I16(-200), |
628 /* 1112 S> */ B(Return), | 628 /* 1112 S> */ B(Return), |
629 B(LdaUndefined), | 629 B(LdaUndefined), |
630 /* 1112 S> */ B(Return), | 630 /* 1112 S> */ B(Return), |
631 ] | 631 ] |
632 constant pool: [ | 632 constant pool: [ |
633 Smi [391], | 633 Smi [391], |
634 ] | 634 ] |
635 handlers: [ | 635 handlers: [ |
636 ] | 636 ] |
637 | 637 |
(...skipping 13 matching lines...) Expand all Loading... |
651 f(1, 1); | 651 f(1, 1); |
652 " | 652 " |
653 frame size: 0 | 653 frame size: 0 |
654 parameter count: 3 | 654 parameter count: 3 |
655 bytecode array length: 81 | 655 bytecode array length: 81 |
656 bytecodes: [ | 656 bytecodes: [ |
657 /* 10 E> */ B(StackCheck), | 657 /* 10 E> */ B(StackCheck), |
658 /* 21 S> */ B(Ldar), R(arg1), | 658 /* 21 S> */ B(Ldar), R(arg1), |
659 /* 27 E> */ B(TestEqual), R(arg0), U8(2), | 659 /* 27 E> */ B(TestEqual), R(arg0), U8(2), |
660 B(JumpIfFalse), U8(5), | 660 B(JumpIfFalse), U8(5), |
661 /* 35 S> */ B(LdaSmi), U8(1), | 661 /* 35 S> */ B(LdaSmi), I8(1), |
662 /* 262 S> */ B(Return), | 662 /* 262 S> */ B(Return), |
663 /* 49 S> */ B(Ldar), R(arg1), | 663 /* 49 S> */ B(Ldar), R(arg1), |
664 /* 55 E> */ B(TestEqualStrict), R(arg0), U8(3), | 664 /* 55 E> */ B(TestEqualStrict), R(arg0), U8(3), |
665 B(JumpIfFalse), U8(5), | 665 B(JumpIfFalse), U8(5), |
666 /* 64 S> */ B(LdaSmi), U8(1), | 666 /* 64 S> */ B(LdaSmi), I8(1), |
667 /* 262 S> */ B(Return), | 667 /* 262 S> */ B(Return), |
668 /* 78 S> */ B(Ldar), R(arg1), | 668 /* 78 S> */ B(Ldar), R(arg1), |
669 /* 84 E> */ B(TestLessThan), R(arg0), U8(4), | 669 /* 84 E> */ B(TestLessThan), R(arg0), U8(4), |
670 B(JumpIfFalse), U8(5), | 670 B(JumpIfFalse), U8(5), |
671 /* 91 S> */ B(LdaSmi), U8(1), | 671 /* 91 S> */ B(LdaSmi), I8(1), |
672 /* 262 S> */ B(Return), | 672 /* 262 S> */ B(Return), |
673 /* 105 S> */ B(Ldar), R(arg1), | 673 /* 105 S> */ B(Ldar), R(arg1), |
674 /* 111 E> */ B(TestGreaterThan), R(arg0), U8(5), | 674 /* 111 E> */ B(TestGreaterThan), R(arg0), U8(5), |
675 B(JumpIfFalse), U8(5), | 675 B(JumpIfFalse), U8(5), |
676 /* 118 S> */ B(LdaSmi), U8(1), | 676 /* 118 S> */ B(LdaSmi), I8(1), |
677 /* 262 S> */ B(Return), | 677 /* 262 S> */ B(Return), |
678 /* 132 S> */ B(Ldar), R(arg1), | 678 /* 132 S> */ B(Ldar), R(arg1), |
679 /* 138 E> */ B(TestLessThanOrEqual), R(arg0), U8(6), | 679 /* 138 E> */ B(TestLessThanOrEqual), R(arg0), U8(6), |
680 B(JumpIfFalse), U8(5), | 680 B(JumpIfFalse), U8(5), |
681 /* 146 S> */ B(LdaSmi), U8(1), | 681 /* 146 S> */ B(LdaSmi), I8(1), |
682 /* 262 S> */ B(Return), | 682 /* 262 S> */ B(Return), |
683 /* 160 S> */ B(Ldar), R(arg1), | 683 /* 160 S> */ B(Ldar), R(arg1), |
684 /* 166 E> */ B(TestGreaterThanOrEqual), R(arg0), U8(7), | 684 /* 166 E> */ B(TestGreaterThanOrEqual), R(arg0), U8(7), |
685 B(JumpIfFalse), U8(5), | 685 B(JumpIfFalse), U8(5), |
686 /* 174 S> */ B(LdaSmi), U8(1), | 686 /* 174 S> */ B(LdaSmi), I8(1), |
687 /* 262 S> */ B(Return), | 687 /* 262 S> */ B(Return), |
688 /* 188 S> */ B(Ldar), R(arg1), | 688 /* 188 S> */ B(Ldar), R(arg1), |
689 /* 194 E> */ B(TestIn), R(arg0), | 689 /* 194 E> */ B(TestIn), R(arg0), |
690 B(JumpIfFalse), U8(5), | 690 B(JumpIfFalse), U8(5), |
691 /* 202 S> */ B(LdaSmi), U8(1), | 691 /* 202 S> */ B(LdaSmi), I8(1), |
692 /* 262 S> */ B(Return), | 692 /* 262 S> */ B(Return), |
693 /* 216 S> */ B(Ldar), R(arg1), | 693 /* 216 S> */ B(Ldar), R(arg1), |
694 /* 222 E> */ B(TestInstanceOf), R(arg0), | 694 /* 222 E> */ B(TestInstanceOf), R(arg0), |
695 B(JumpIfFalse), U8(5), | 695 B(JumpIfFalse), U8(5), |
696 /* 238 S> */ B(LdaSmi), U8(1), | 696 /* 238 S> */ B(LdaSmi), I8(1), |
697 /* 262 S> */ B(Return), | 697 /* 262 S> */ B(Return), |
698 /* 252 S> */ B(LdaZero), | 698 /* 252 S> */ B(LdaZero), |
699 /* 262 S> */ B(Return), | 699 /* 262 S> */ B(Return), |
700 ] | 700 ] |
701 constant pool: [ | 701 constant pool: [ |
702 ] | 702 ] |
703 handlers: [ | 703 handlers: [ |
704 ] | 704 ] |
705 | 705 |
706 --- | 706 --- |
707 snippet: " | 707 snippet: " |
708 function f() { | 708 function f() { |
709 var a = 0; | 709 var a = 0; |
710 if (a) { | 710 if (a) { |
711 return 20; | 711 return 20; |
712 } else { | 712 } else { |
713 return -20; | 713 return -20; |
714 } | 714 } |
715 }; | 715 }; |
716 f(); | 716 f(); |
717 " | 717 " |
718 frame size: 1 | 718 frame size: 1 |
719 parameter count: 1 | 719 parameter count: 1 |
720 bytecode array length: 14 | 720 bytecode array length: 14 |
721 bytecodes: [ | 721 bytecodes: [ |
722 /* 10 E> */ B(StackCheck), | 722 /* 10 E> */ B(StackCheck), |
723 /* 25 S> */ B(LdaZero), | 723 /* 25 S> */ B(LdaZero), |
724 B(Star), R(0), | 724 B(Star), R(0), |
725 /* 30 S> */ B(JumpIfToBooleanFalse), U8(5), | 725 /* 30 S> */ B(JumpIfToBooleanFalse), U8(5), |
726 /* 43 S> */ B(LdaSmi), U8(20), | 726 /* 43 S> */ B(LdaSmi), I8(20), |
727 /* 85 S> */ B(Return), | 727 /* 85 S> */ B(Return), |
728 /* 69 S> */ B(LdaSmi), U8(-20), | 728 /* 69 S> */ B(LdaSmi), I8(-20), |
729 /* 85 S> */ B(Return), | 729 /* 85 S> */ B(Return), |
730 B(LdaUndefined), | 730 B(LdaUndefined), |
731 /* 85 S> */ B(Return), | 731 /* 85 S> */ B(Return), |
732 ] | 732 ] |
733 constant pool: [ | 733 constant pool: [ |
734 ] | 734 ] |
735 handlers: [ | 735 handlers: [ |
736 ] | 736 ] |
737 | 737 |
738 --- | 738 --- |
(...skipping 13 matching lines...) Expand all Loading... |
752 parameter count: 3 | 752 parameter count: 3 |
753 bytecode array length: 36 | 753 bytecode array length: 36 |
754 bytecodes: [ | 754 bytecodes: [ |
755 /* 10 E> */ B(StackCheck), | 755 /* 10 E> */ B(StackCheck), |
756 /* 21 S> */ B(Ldar), R(arg1), | 756 /* 21 S> */ B(Ldar), R(arg1), |
757 /* 27 E> */ B(TestEqual), R(arg0), U8(2), | 757 /* 27 E> */ B(TestEqual), R(arg0), U8(2), |
758 B(JumpIfTrue), U8(8), | 758 B(JumpIfTrue), U8(8), |
759 B(LdaZero), | 759 B(LdaZero), |
760 /* 37 E> */ B(TestLessThan), R(arg0), U8(3), | 760 /* 37 E> */ B(TestLessThan), R(arg0), U8(3), |
761 B(JumpIfFalse), U8(5), | 761 B(JumpIfFalse), U8(5), |
762 /* 48 S> */ B(LdaSmi), U8(1), | 762 /* 48 S> */ B(LdaSmi), I8(1), |
763 /* 133 S> */ B(Return), | 763 /* 133 S> */ B(Return), |
764 /* 67 S> */ B(LdaZero), | 764 /* 67 S> */ B(LdaZero), |
765 /* 73 E> */ B(TestGreaterThan), R(arg0), U8(4), | 765 /* 73 E> */ B(TestGreaterThan), R(arg0), U8(4), |
766 B(JumpIfFalse), U8(10), | 766 B(JumpIfFalse), U8(10), |
767 B(LdaZero), | 767 B(LdaZero), |
768 /* 82 E> */ B(TestGreaterThan), R(arg1), U8(5), | 768 /* 82 E> */ B(TestGreaterThan), R(arg1), U8(5), |
769 B(JumpIfFalse), U8(4), | 769 B(JumpIfFalse), U8(4), |
770 /* 93 S> */ B(LdaZero), | 770 /* 93 S> */ B(LdaZero), |
771 /* 133 S> */ B(Return), | 771 /* 133 S> */ B(Return), |
772 /* 118 S> */ B(LdaSmi), U8(-1), | 772 /* 118 S> */ B(LdaSmi), I8(-1), |
773 /* 133 S> */ B(Return), | 773 /* 133 S> */ B(Return), |
774 B(LdaUndefined), | 774 B(LdaUndefined), |
775 /* 133 S> */ B(Return), | 775 /* 133 S> */ B(Return), |
776 ] | 776 ] |
777 constant pool: [ | 777 constant pool: [ |
778 ] | 778 ] |
779 handlers: [ | 779 handlers: [ |
780 ] | 780 ] |
781 | 781 |
OLD | NEW |