OLD | NEW |
1 # | 1 # |
2 # Autogenerated by generate-bytecode-expectations. | 2 # Autogenerated by generate-bytecode-expectations. |
3 # | 3 # |
4 | 4 |
5 --- | 5 --- |
6 pool type: number | 6 pool type: number |
7 execute: yes | 7 execute: yes |
8 wrap: no | 8 wrap: no |
9 test function name: f | 9 test function name: f |
10 | 10 |
11 --- | 11 --- |
12 snippet: " | 12 snippet: " |
13 function f() { | 13 function f() { |
14 if (0) { | 14 if (0) { |
15 return 1; | 15 return 1; |
16 } else { | 16 } else { |
17 return -1; | 17 return -1; |
18 } | 18 } |
19 }; | 19 }; |
20 f(); | 20 f(); |
21 " | 21 " |
22 frame size: 0 | 22 frame size: 0 |
23 parameter count: 1 | 23 parameter count: 1 |
24 bytecode array length: 4 | 24 bytecode array length: 4 |
25 bytecodes: [ | 25 bytecodes: [ |
26 B(StackCheck), | 26 B(StackCheck), |
27 B(LdaSmi8), U8(-1), | 27 B(LdaSmi), U8(-1), |
28 B(Return), | 28 B(Return), |
29 ] | 29 ] |
30 constant pool: [ | 30 constant pool: [ |
31 ] | 31 ] |
32 handlers: [ | 32 handlers: [ |
33 ] | 33 ] |
34 | 34 |
35 --- | 35 --- |
36 snippet: " | 36 snippet: " |
37 function f() { | 37 function f() { |
38 if ('lucky') { | 38 if ('lucky') { |
39 return 1; | 39 return 1; |
40 } else { | 40 } else { |
41 return -1; | 41 return -1; |
42 } | 42 } |
43 }; | 43 }; |
44 f(); | 44 f(); |
45 " | 45 " |
46 frame size: 0 | 46 frame size: 0 |
47 parameter count: 1 | 47 parameter count: 1 |
48 bytecode array length: 4 | 48 bytecode array length: 4 |
49 bytecodes: [ | 49 bytecodes: [ |
50 B(StackCheck), | 50 B(StackCheck), |
51 B(LdaSmi8), U8(1), | 51 B(LdaSmi), U8(1), |
52 B(Return), | 52 B(Return), |
53 ] | 53 ] |
54 constant pool: [ | 54 constant pool: [ |
55 ] | 55 ] |
56 handlers: [ | 56 handlers: [ |
57 ] | 57 ] |
58 | 58 |
59 --- | 59 --- |
60 snippet: " | 60 snippet: " |
61 function f() { | 61 function f() { |
62 if (false) { | 62 if (false) { |
63 return 1; | 63 return 1; |
64 } else { | 64 } else { |
65 return -1; | 65 return -1; |
66 } | 66 } |
67 }; | 67 }; |
68 f(); | 68 f(); |
69 " | 69 " |
70 frame size: 0 | 70 frame size: 0 |
71 parameter count: 1 | 71 parameter count: 1 |
72 bytecode array length: 4 | 72 bytecode array length: 4 |
73 bytecodes: [ | 73 bytecodes: [ |
74 B(StackCheck), | 74 B(StackCheck), |
75 B(LdaSmi8), U8(-1), | 75 B(LdaSmi), U8(-1), |
76 B(Return), | 76 B(Return), |
77 ] | 77 ] |
78 constant pool: [ | 78 constant pool: [ |
79 ] | 79 ] |
80 handlers: [ | 80 handlers: [ |
81 ] | 81 ] |
82 | 82 |
83 --- | 83 --- |
84 snippet: " | 84 snippet: " |
85 function f() { | 85 function f() { |
(...skipping 26 matching lines...) Expand all Loading... |
112 return 2; | 112 return 2; |
113 } | 113 } |
114 }; | 114 }; |
115 f(); | 115 f(); |
116 " | 116 " |
117 frame size: 2 | 117 frame size: 2 |
118 parameter count: 1 | 118 parameter count: 1 |
119 bytecode array length: 24 | 119 bytecode array length: 24 |
120 bytecodes: [ | 120 bytecodes: [ |
121 B(StackCheck), | 121 B(StackCheck), |
122 B(LdaSmi8), U8(1), | 122 B(LdaSmi), U8(1), |
123 B(Star), R(0), | 123 B(Star), R(0), |
124 B(JumpIfToBooleanFalse), U8(14), | 124 B(JumpIfToBooleanFalse), U8(14), |
125 B(Ldar), R(0), | 125 B(Ldar), R(0), |
126 B(Star), R(1), | 126 B(Star), R(1), |
127 B(LdaSmi8), U8(1), | 127 B(LdaSmi), U8(1), |
128 B(Add), R(1), | 128 B(Add), R(1), |
129 B(Star), R(0), | 129 B(Star), R(0), |
130 B(Jump), U8(5), | 130 B(Jump), U8(5), |
131 B(LdaSmi8), U8(2), | 131 B(LdaSmi), U8(2), |
132 B(Return), | 132 B(Return), |
133 B(LdaUndefined), | 133 B(LdaUndefined), |
134 B(Return), | 134 B(Return), |
135 ] | 135 ] |
136 constant pool: [ | 136 constant pool: [ |
137 ] | 137 ] |
138 handlers: [ | 138 handlers: [ |
139 ] | 139 ] |
140 | 140 |
141 --- | 141 --- |
142 snippet: " | 142 snippet: " |
143 function f(a) { | 143 function f(a) { |
144 if (a <= 0) { | 144 if (a <= 0) { |
145 return 200; | 145 return 200; |
146 } else { | 146 } else { |
147 return -200; | 147 return -200; |
148 } | 148 } |
149 }; | 149 }; |
150 f(99); | 150 f(99); |
151 " | 151 " |
152 frame size: 1 | 152 frame size: 1 |
153 parameter count: 2 | 153 parameter count: 2 |
154 bytecode array length: 18 | 154 bytecode array length: 22 |
155 bytecodes: [ | 155 bytecodes: [ |
156 B(StackCheck), | 156 B(StackCheck), |
157 B(Ldar), R(arg0), | 157 B(Ldar), R(arg0), |
158 B(Star), R(0), | 158 B(Star), R(0), |
159 B(LdaZero), | 159 B(LdaZero), |
160 B(TestLessThanOrEqual), R(0), | 160 B(TestLessThanOrEqual), R(0), |
161 B(JumpIfFalse), U8(5), | 161 B(JumpIfFalse), U8(7), |
162 B(LdaConstant), U8(0), | 162 B(Wide), B(LdaSmi), U16(200), |
163 B(Return), | 163 B(Return), |
164 B(LdaConstant), U8(1), | 164 B(Wide), B(LdaSmi), U16(-200), |
165 B(Return), | 165 B(Return), |
166 B(LdaUndefined), | 166 B(LdaUndefined), |
167 B(Return), | 167 B(Return), |
168 ] | 168 ] |
169 constant pool: [ | 169 constant pool: [ |
170 200, | |
171 -200, | |
172 ] | 170 ] |
173 handlers: [ | 171 handlers: [ |
174 ] | 172 ] |
175 | 173 |
176 --- | 174 --- |
177 snippet: " | 175 snippet: " |
178 function f(a, b) { if (a in b) { return 200; } }f('prop', { prop: 'yes'}); | 176 function f(a, b) { if (a in b) { return 200; } }f('prop', { prop: 'yes'}); |
179 " | 177 " |
180 frame size: 1 | 178 frame size: 1 |
181 parameter count: 3 | 179 parameter count: 3 |
182 bytecode array length: 16 | 180 bytecode array length: 18 |
183 bytecodes: [ | 181 bytecodes: [ |
184 B(StackCheck), | 182 B(StackCheck), |
185 B(Ldar), R(arg0), | 183 B(Ldar), R(arg0), |
186 B(Star), R(0), | 184 B(Star), R(0), |
187 B(Ldar), R(arg1), | 185 B(Ldar), R(arg1), |
188 B(TestIn), R(0), | 186 B(TestIn), R(0), |
189 B(JumpIfFalse), U8(5), | 187 B(JumpIfFalse), U8(7), |
190 B(LdaConstant), U8(0), | 188 B(Wide), B(LdaSmi), U16(200), |
191 B(Return), | 189 B(Return), |
192 B(LdaUndefined), | 190 B(LdaUndefined), |
193 B(Return), | 191 B(Return), |
194 ] | 192 ] |
195 constant pool: [ | 193 constant pool: [ |
196 200, | |
197 ] | 194 ] |
198 handlers: [ | 195 handlers: [ |
199 ] | 196 ] |
200 | 197 |
201 --- | 198 --- |
202 snippet: " | 199 snippet: " |
203 function f(z) { var a = 0; var b = 0; if (a === 0.01) { | 200 function f(z) { var a = 0; var b = 0; if (a === 0.01) { |
204 b = a; a = b; | 201 b = a; a = b; |
205 b = a; a = b; | 202 b = a; a = b; |
206 b = a; a = b; | 203 b = a; a = b; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 b = a; a = b; | 259 b = a; a = b; |
263 b = a; a = b; | 260 b = a; a = b; |
264 b = a; a = b; | 261 b = a; a = b; |
265 b = a; a = b; | 262 b = a; a = b; |
266 b = a; a = b; | 263 b = a; a = b; |
267 b = a; a = b; | 264 b = a; a = b; |
268 return 200; } else { return -200; } } f(0.001); | 265 return 200; } else { return -200; } } f(0.001); |
269 " | 266 " |
270 frame size: 3 | 267 frame size: 3 |
271 parameter count: 2 | 268 parameter count: 2 |
272 bytecode array length: 283 | 269 bytecode array length: 287 |
273 bytecodes: [ | 270 bytecodes: [ |
274 B(StackCheck), | 271 B(StackCheck), |
275 B(LdaZero), | 272 B(LdaZero), |
276 B(Star), R(0), | 273 B(Star), R(0), |
277 B(LdaZero), | 274 B(LdaZero), |
278 B(Star), R(1), | 275 B(Star), R(1), |
279 B(Ldar), R(0), | 276 B(Ldar), R(0), |
280 B(Star), R(2), | 277 B(Star), R(2), |
281 B(LdaConstant), U8(0), | 278 B(LdaConstant), U8(0), |
282 B(TestEqualStrict), R(2), | 279 B(TestEqualStrict), R(2), |
283 B(JumpIfFalseConstant), U8(2), | 280 B(JumpIfFalseConstant), U8(1), |
284 B(Ldar), R(0), | 281 B(Ldar), R(0), |
285 B(Star), R(1), | 282 B(Star), R(1), |
286 B(Star), R(0), | 283 B(Star), R(0), |
287 B(Star), R(1), | 284 B(Star), R(1), |
288 B(Star), R(0), | 285 B(Star), R(0), |
289 B(Star), R(1), | 286 B(Star), R(1), |
290 B(Star), R(0), | 287 B(Star), R(0), |
291 B(Star), R(1), | 288 B(Star), R(1), |
292 B(Star), R(0), | 289 B(Star), R(0), |
293 B(Star), R(1), | 290 B(Star), R(1), |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 B(Star), R(1), | 400 B(Star), R(1), |
404 B(Star), R(0), | 401 B(Star), R(0), |
405 B(Star), R(1), | 402 B(Star), R(1), |
406 B(Star), R(0), | 403 B(Star), R(0), |
407 B(Star), R(1), | 404 B(Star), R(1), |
408 B(Star), R(0), | 405 B(Star), R(0), |
409 B(Star), R(1), | 406 B(Star), R(1), |
410 B(Star), R(0), | 407 B(Star), R(0), |
411 B(Star), R(1), | 408 B(Star), R(1), |
412 B(Star), R(0), | 409 B(Star), R(0), |
413 B(LdaConstant), U8(1), | 410 B(Wide), B(LdaSmi), U16(200), |
414 B(Return), | 411 B(Return), |
415 B(LdaConstant), U8(3), | 412 B(Wide), B(LdaSmi), U16(-200), |
416 B(Return), | 413 B(Return), |
417 B(LdaUndefined), | 414 B(LdaUndefined), |
418 B(Return), | 415 B(Return), |
419 ] | 416 ] |
420 constant pool: [ | 417 constant pool: [ |
421 0.01, | 418 0.01, |
422 200, | 419 265, |
423 263, | |
424 -200, | |
425 ] | 420 ] |
426 handlers: [ | 421 handlers: [ |
427 ] | 422 ] |
428 | 423 |
429 --- | 424 --- |
430 snippet: " | 425 snippet: " |
431 function f() { | 426 function f() { |
432 var a = 0; var b = 0; | 427 var a = 0; var b = 0; |
433 if (a) { | 428 if (a) { |
434 b = a; a = b; | 429 b = a; a = b; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 b = a; a = b; | 489 b = a; a = b; |
495 b = a; a = b; | 490 b = a; a = b; |
496 b = a; a = b; | 491 b = a; a = b; |
497 b = a; a = b; | 492 b = a; a = b; |
498 return 200; } else { return -200; } | 493 return 200; } else { return -200; } |
499 }; | 494 }; |
500 f(); | 495 f(); |
501 " | 496 " |
502 frame size: 2 | 497 frame size: 2 |
503 parameter count: 1 | 498 parameter count: 1 |
504 bytecode array length: 277 | 499 bytecode array length: 281 |
505 bytecodes: [ | 500 bytecodes: [ |
506 B(StackCheck), | 501 B(StackCheck), |
507 B(LdaZero), | 502 B(LdaZero), |
508 B(Star), R(0), | 503 B(Star), R(0), |
509 B(LdaZero), | 504 B(LdaZero), |
510 B(Star), R(1), | 505 B(Star), R(1), |
511 B(Ldar), R(0), | 506 B(Ldar), R(0), |
512 B(JumpIfToBooleanFalseConstant), U8(1), | 507 B(JumpIfToBooleanFalseConstant), U8(0), |
513 B(Ldar), R(0), | 508 B(Ldar), R(0), |
514 B(Star), R(1), | 509 B(Star), R(1), |
515 B(Star), R(0), | 510 B(Star), R(0), |
516 B(Star), R(1), | 511 B(Star), R(1), |
517 B(Star), R(0), | 512 B(Star), R(0), |
518 B(Star), R(1), | 513 B(Star), R(1), |
519 B(Star), R(0), | 514 B(Star), R(0), |
520 B(Star), R(1), | 515 B(Star), R(1), |
521 B(Star), R(0), | 516 B(Star), R(0), |
522 B(Star), R(1), | 517 B(Star), R(1), |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 B(Star), R(1), | 627 B(Star), R(1), |
633 B(Star), R(0), | 628 B(Star), R(0), |
634 B(Star), R(1), | 629 B(Star), R(1), |
635 B(Star), R(0), | 630 B(Star), R(0), |
636 B(Star), R(1), | 631 B(Star), R(1), |
637 B(Star), R(0), | 632 B(Star), R(0), |
638 B(Star), R(1), | 633 B(Star), R(1), |
639 B(Star), R(0), | 634 B(Star), R(0), |
640 B(Star), R(1), | 635 B(Star), R(1), |
641 B(Star), R(0), | 636 B(Star), R(0), |
642 B(LdaConstant), U8(0), | 637 B(Wide), B(LdaSmi), U16(200), |
643 B(Return), | 638 B(Return), |
644 B(LdaConstant), U8(2), | 639 B(Wide), B(LdaSmi), U16(-200), |
645 B(Return), | 640 B(Return), |
646 B(LdaUndefined), | 641 B(LdaUndefined), |
647 B(Return), | 642 B(Return), |
648 ] | 643 ] |
649 constant pool: [ | 644 constant pool: [ |
650 200, | 645 265, |
651 263, | |
652 -200, | |
653 ] | 646 ] |
654 handlers: [ | 647 handlers: [ |
655 ] | 648 ] |
656 | 649 |
657 --- | 650 --- |
658 snippet: " | 651 snippet: " |
659 function f(a, b) { | 652 function f(a, b) { |
660 if (a == b) { return 1; } | 653 if (a == b) { return 1; } |
661 if (a === b) { return 1; } | 654 if (a === b) { return 1; } |
662 if (a < b) { return 1; } | 655 if (a < b) { return 1; } |
663 if (a > b) { return 1; } | 656 if (a > b) { return 1; } |
664 if (a <= b) { return 1; } | 657 if (a <= b) { return 1; } |
665 if (a >= b) { return 1; } | 658 if (a >= b) { return 1; } |
666 if (a in b) { return 1; } | 659 if (a in b) { return 1; } |
667 if (a instanceof b) { return 1; } | 660 if (a instanceof b) { return 1; } |
668 return 0; | 661 return 0; |
669 } | 662 } |
670 f(1, 1); | 663 f(1, 1); |
671 " | 664 " |
672 frame size: 1 | 665 frame size: 1 |
673 parameter count: 3 | 666 parameter count: 3 |
674 bytecode array length: 107 | 667 bytecode array length: 107 |
675 bytecodes: [ | 668 bytecodes: [ |
676 B(StackCheck), | 669 B(StackCheck), |
677 B(Ldar), R(arg0), | 670 B(Ldar), R(arg0), |
678 B(Star), R(0), | 671 B(Star), R(0), |
679 B(Ldar), R(arg1), | 672 B(Ldar), R(arg1), |
680 B(TestEqual), R(0), | 673 B(TestEqual), R(0), |
681 B(JumpIfFalse), U8(5), | 674 B(JumpIfFalse), U8(5), |
682 B(LdaSmi8), U8(1), | 675 B(LdaSmi), U8(1), |
683 B(Return), | 676 B(Return), |
684 B(Ldar), R(arg0), | 677 B(Ldar), R(arg0), |
685 B(Star), R(0), | 678 B(Star), R(0), |
686 B(Ldar), R(arg1), | 679 B(Ldar), R(arg1), |
687 B(TestEqualStrict), R(0), | 680 B(TestEqualStrict), R(0), |
688 B(JumpIfFalse), U8(5), | 681 B(JumpIfFalse), U8(5), |
689 B(LdaSmi8), U8(1), | 682 B(LdaSmi), U8(1), |
690 B(Return), | 683 B(Return), |
691 B(Ldar), R(arg0), | 684 B(Ldar), R(arg0), |
692 B(Star), R(0), | 685 B(Star), R(0), |
693 B(Ldar), R(arg1), | 686 B(Ldar), R(arg1), |
694 B(TestLessThan), R(0), | 687 B(TestLessThan), R(0), |
695 B(JumpIfFalse), U8(5), | 688 B(JumpIfFalse), U8(5), |
696 B(LdaSmi8), U8(1), | 689 B(LdaSmi), U8(1), |
697 B(Return), | 690 B(Return), |
698 B(Ldar), R(arg0), | 691 B(Ldar), R(arg0), |
699 B(Star), R(0), | 692 B(Star), R(0), |
700 B(Ldar), R(arg1), | 693 B(Ldar), R(arg1), |
701 B(TestGreaterThan), R(0), | 694 B(TestGreaterThan), R(0), |
702 B(JumpIfFalse), U8(5), | 695 B(JumpIfFalse), U8(5), |
703 B(LdaSmi8), U8(1), | 696 B(LdaSmi), U8(1), |
704 B(Return), | 697 B(Return), |
705 B(Ldar), R(arg0), | 698 B(Ldar), R(arg0), |
706 B(Star), R(0), | 699 B(Star), R(0), |
707 B(Ldar), R(arg1), | 700 B(Ldar), R(arg1), |
708 B(TestLessThanOrEqual), R(0), | 701 B(TestLessThanOrEqual), R(0), |
709 B(JumpIfFalse), U8(5), | 702 B(JumpIfFalse), U8(5), |
710 B(LdaSmi8), U8(1), | 703 B(LdaSmi), U8(1), |
711 B(Return), | 704 B(Return), |
712 B(Ldar), R(arg0), | 705 B(Ldar), R(arg0), |
713 B(Star), R(0), | 706 B(Star), R(0), |
714 B(Ldar), R(arg1), | 707 B(Ldar), R(arg1), |
715 B(TestGreaterThanOrEqual), R(0), | 708 B(TestGreaterThanOrEqual), R(0), |
716 B(JumpIfFalse), U8(5), | 709 B(JumpIfFalse), U8(5), |
717 B(LdaSmi8), U8(1), | 710 B(LdaSmi), U8(1), |
718 B(Return), | 711 B(Return), |
719 B(Ldar), R(arg0), | 712 B(Ldar), R(arg0), |
720 B(Star), R(0), | 713 B(Star), R(0), |
721 B(Ldar), R(arg1), | 714 B(Ldar), R(arg1), |
722 B(TestIn), R(0), | 715 B(TestIn), R(0), |
723 B(JumpIfFalse), U8(5), | 716 B(JumpIfFalse), U8(5), |
724 B(LdaSmi8), U8(1), | 717 B(LdaSmi), U8(1), |
725 B(Return), | 718 B(Return), |
726 B(Ldar), R(arg0), | 719 B(Ldar), R(arg0), |
727 B(Star), R(0), | 720 B(Star), R(0), |
728 B(Ldar), R(arg1), | 721 B(Ldar), R(arg1), |
729 B(TestInstanceOf), R(0), | 722 B(TestInstanceOf), R(0), |
730 B(JumpIfFalse), U8(5), | 723 B(JumpIfFalse), U8(5), |
731 B(LdaSmi8), U8(1), | 724 B(LdaSmi), U8(1), |
732 B(Return), | 725 B(Return), |
733 B(LdaZero), | 726 B(LdaZero), |
734 B(Return), | 727 B(Return), |
735 ] | 728 ] |
736 constant pool: [ | 729 constant pool: [ |
737 ] | 730 ] |
738 handlers: [ | 731 handlers: [ |
739 ] | 732 ] |
740 | 733 |
741 --- | 734 --- |
742 snippet: " | 735 snippet: " |
743 function f() { | 736 function f() { |
744 var a = 0; | 737 var a = 0; |
745 if (a) { | 738 if (a) { |
746 return 20; | 739 return 20; |
747 } else { | 740 } else { |
748 return -20; | 741 return -20; |
749 } | 742 } |
750 }; | 743 }; |
751 f(); | 744 f(); |
752 " | 745 " |
753 frame size: 1 | 746 frame size: 1 |
754 parameter count: 1 | 747 parameter count: 1 |
755 bytecode array length: 14 | 748 bytecode array length: 14 |
756 bytecodes: [ | 749 bytecodes: [ |
757 B(StackCheck), | 750 B(StackCheck), |
758 B(LdaZero), | 751 B(LdaZero), |
759 B(Star), R(0), | 752 B(Star), R(0), |
760 B(JumpIfToBooleanFalse), U8(5), | 753 B(JumpIfToBooleanFalse), U8(5), |
761 B(LdaSmi8), U8(20), | 754 B(LdaSmi), U8(20), |
762 B(Return), | 755 B(Return), |
763 B(LdaSmi8), U8(-20), | 756 B(LdaSmi), U8(-20), |
764 B(Return), | 757 B(Return), |
765 B(LdaUndefined), | 758 B(LdaUndefined), |
766 B(Return), | 759 B(Return), |
767 ] | 760 ] |
768 constant pool: [ | 761 constant pool: [ |
769 ] | 762 ] |
770 handlers: [ | 763 handlers: [ |
771 ] | 764 ] |
772 | 765 |
OLD | NEW |