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: yes | 8 wrap: yes |
9 | 9 |
10 --- | 10 --- |
11 snippet: " | 11 snippet: " |
12 var a = 1; | 12 var a = 1; |
13 switch(a) { | 13 switch(a) { |
14 case 1: return 2; | 14 case 1: return 2; |
15 case 2: return 3; | 15 case 2: return 3; |
16 } | 16 } |
17 " | 17 " |
18 frame size: 3 | 18 frame size: 3 |
19 parameter count: 1 | 19 parameter count: 1 |
20 bytecode array length: 32 | 20 bytecode array length: 34 |
21 bytecodes: [ | 21 bytecodes: [ |
22 /* 30 E> */ B(StackCheck), | 22 /* 30 E> */ B(StackCheck), |
23 /* 42 S> */ B(LdaSmi), U8(1), | 23 /* 42 S> */ B(LdaSmi), U8(1), |
24 B(Star), R(0), | 24 B(Star), R(0), |
25 B(Star), R(1), | 25 B(Star), R(1), |
26 /* 45 S> */ B(LdaSmi), U8(1), | 26 /* 45 S> */ B(LdaSmi), U8(1), |
27 B(TestEqualStrict), R(1), | 27 B(TestEqualStrict), R(1), U8(1), |
28 B(Mov), R(0), R(2), | 28 B(Mov), R(0), R(2), |
29 B(JumpIfToBooleanTrue), U8(10), | 29 B(JumpIfToBooleanTrue), U8(11), |
30 B(LdaSmi), U8(2), | 30 B(LdaSmi), U8(2), |
31 B(TestEqualStrict), R(2), | 31 B(TestEqualStrict), R(2), U8(2), |
32 B(JumpIfTrue), U8(7), | 32 B(JumpIfTrue), U8(7), |
33 B(Jump), U8(8), | 33 B(Jump), U8(8), |
34 /* 66 S> */ B(LdaSmi), U8(2), | 34 /* 66 S> */ B(LdaSmi), U8(2), |
35 /* 97 S> */ B(Return), | 35 /* 97 S> */ B(Return), |
36 /* 85 S> */ B(LdaSmi), U8(3), | 36 /* 85 S> */ B(LdaSmi), U8(3), |
37 /* 97 S> */ B(Return), | 37 /* 97 S> */ B(Return), |
38 B(LdaUndefined), | 38 B(LdaUndefined), |
39 /* 97 S> */ B(Return), | 39 /* 97 S> */ B(Return), |
40 ] | 40 ] |
41 constant pool: [ | 41 constant pool: [ |
42 ] | 42 ] |
43 handlers: [ | 43 handlers: [ |
44 ] | 44 ] |
45 | 45 |
46 --- | 46 --- |
47 snippet: " | 47 snippet: " |
48 var a = 1; | 48 var a = 1; |
49 switch(a) { | 49 switch(a) { |
50 case 1: a = 2; break; | 50 case 1: a = 2; break; |
51 case 2: a = 3; break; | 51 case 2: a = 3; break; |
52 } | 52 } |
53 " | 53 " |
54 frame size: 3 | 54 frame size: 3 |
55 parameter count: 1 | 55 parameter count: 1 |
56 bytecode array length: 38 | 56 bytecode array length: 40 |
57 bytecodes: [ | 57 bytecodes: [ |
58 /* 30 E> */ B(StackCheck), | 58 /* 30 E> */ B(StackCheck), |
59 /* 42 S> */ B(LdaSmi), U8(1), | 59 /* 42 S> */ B(LdaSmi), U8(1), |
60 B(Star), R(0), | 60 B(Star), R(0), |
61 B(Star), R(1), | 61 B(Star), R(1), |
62 /* 45 S> */ B(LdaSmi), U8(1), | 62 /* 45 S> */ B(LdaSmi), U8(1), |
63 B(TestEqualStrict), R(1), | 63 B(TestEqualStrict), R(1), U8(1), |
64 B(Mov), R(0), R(2), | 64 B(Mov), R(0), R(2), |
65 B(JumpIfToBooleanTrue), U8(10), | 65 B(JumpIfToBooleanTrue), U8(11), |
66 B(LdaSmi), U8(2), | 66 B(LdaSmi), U8(2), |
67 B(TestEqualStrict), R(2), | 67 B(TestEqualStrict), R(2), U8(2), |
68 B(JumpIfTrue), U8(10), | 68 B(JumpIfTrue), U8(10), |
69 B(Jump), U8(14), | 69 B(Jump), U8(14), |
70 /* 66 S> */ B(LdaSmi), U8(2), | 70 /* 66 S> */ B(LdaSmi), U8(2), |
71 B(Star), R(0), | 71 B(Star), R(0), |
72 /* 73 S> */ B(Jump), U8(8), | 72 /* 73 S> */ B(Jump), U8(8), |
73 /* 89 S> */ B(LdaSmi), U8(3), | 73 /* 89 S> */ B(LdaSmi), U8(3), |
74 B(Star), R(0), | 74 B(Star), R(0), |
75 /* 96 S> */ B(Jump), U8(2), | 75 /* 96 S> */ B(Jump), U8(2), |
76 B(LdaUndefined), | 76 B(LdaUndefined), |
77 /* 105 S> */ B(Return), | 77 /* 105 S> */ B(Return), |
78 ] | 78 ] |
79 constant pool: [ | 79 constant pool: [ |
80 ] | 80 ] |
81 handlers: [ | 81 handlers: [ |
82 ] | 82 ] |
83 | 83 |
84 --- | 84 --- |
85 snippet: " | 85 snippet: " |
86 var a = 1; | 86 var a = 1; |
87 switch(a) { | 87 switch(a) { |
88 case 1: a = 2; // fall-through | 88 case 1: a = 2; // fall-through |
89 case 2: a = 3; break; | 89 case 2: a = 3; break; |
90 } | 90 } |
91 " | 91 " |
92 frame size: 3 | 92 frame size: 3 |
93 parameter count: 1 | 93 parameter count: 1 |
94 bytecode array length: 36 | 94 bytecode array length: 38 |
95 bytecodes: [ | 95 bytecodes: [ |
96 /* 30 E> */ B(StackCheck), | 96 /* 30 E> */ B(StackCheck), |
97 /* 42 S> */ B(LdaSmi), U8(1), | 97 /* 42 S> */ B(LdaSmi), U8(1), |
98 B(Star), R(0), | 98 B(Star), R(0), |
99 B(Star), R(1), | 99 B(Star), R(1), |
100 /* 45 S> */ B(LdaSmi), U8(1), | 100 /* 45 S> */ B(LdaSmi), U8(1), |
101 B(TestEqualStrict), R(1), | 101 B(TestEqualStrict), R(1), U8(1), |
102 B(Mov), R(0), R(2), | 102 B(Mov), R(0), R(2), |
103 B(JumpIfToBooleanTrue), U8(10), | 103 B(JumpIfToBooleanTrue), U8(11), |
104 B(LdaSmi), U8(2), | 104 B(LdaSmi), U8(2), |
105 B(TestEqualStrict), R(2), | 105 B(TestEqualStrict), R(2), U8(2), |
106 B(JumpIfTrue), U8(8), | 106 B(JumpIfTrue), U8(8), |
107 B(Jump), U8(12), | 107 B(Jump), U8(12), |
108 /* 66 S> */ B(LdaSmi), U8(2), | 108 /* 66 S> */ B(LdaSmi), U8(2), |
109 B(Star), R(0), | 109 B(Star), R(0), |
110 /* 98 S> */ B(LdaSmi), U8(3), | 110 /* 98 S> */ B(LdaSmi), U8(3), |
111 B(Star), R(0), | 111 B(Star), R(0), |
112 /* 105 S> */ B(Jump), U8(2), | 112 /* 105 S> */ B(Jump), U8(2), |
113 B(LdaUndefined), | 113 B(LdaUndefined), |
114 /* 114 S> */ B(Return), | 114 /* 114 S> */ B(Return), |
115 ] | 115 ] |
116 constant pool: [ | 116 constant pool: [ |
117 ] | 117 ] |
118 handlers: [ | 118 handlers: [ |
119 ] | 119 ] |
120 | 120 |
121 --- | 121 --- |
122 snippet: " | 122 snippet: " |
123 var a = 1; | 123 var a = 1; |
124 switch(a) { | 124 switch(a) { |
125 case 2: break; | 125 case 2: break; |
126 case 3: break; | 126 case 3: break; |
127 default: a = 1; break; | 127 default: a = 1; break; |
128 } | 128 } |
129 " | 129 " |
130 frame size: 3 | 130 frame size: 3 |
131 parameter count: 1 | 131 parameter count: 1 |
132 bytecode array length: 36 | 132 bytecode array length: 38 |
133 bytecodes: [ | 133 bytecodes: [ |
134 /* 30 E> */ B(StackCheck), | 134 /* 30 E> */ B(StackCheck), |
135 /* 42 S> */ B(LdaSmi), U8(1), | 135 /* 42 S> */ B(LdaSmi), U8(1), |
136 B(Star), R(0), | 136 B(Star), R(0), |
137 B(Star), R(1), | 137 B(Star), R(1), |
138 /* 45 S> */ B(LdaSmi), U8(2), | 138 /* 45 S> */ B(LdaSmi), U8(2), |
139 B(TestEqualStrict), R(1), | 139 B(TestEqualStrict), R(1), U8(1), |
140 B(Mov), R(0), R(2), | 140 B(Mov), R(0), R(2), |
141 B(JumpIfToBooleanTrue), U8(10), | 141 B(JumpIfToBooleanTrue), U8(11), |
142 B(LdaSmi), U8(3), | 142 B(LdaSmi), U8(3), |
143 B(TestEqualStrict), R(2), | 143 B(TestEqualStrict), R(2), U8(2), |
144 B(JumpIfTrue), U8(6), | 144 B(JumpIfTrue), U8(6), |
145 B(Jump), U8(6), | 145 B(Jump), U8(6), |
146 /* 66 S> */ B(Jump), U8(10), | 146 /* 66 S> */ B(Jump), U8(10), |
147 /* 82 S> */ B(Jump), U8(8), | 147 /* 82 S> */ B(Jump), U8(8), |
148 /* 99 S> */ B(LdaSmi), U8(1), | 148 /* 99 S> */ B(LdaSmi), U8(1), |
149 B(Star), R(0), | 149 B(Star), R(0), |
150 /* 106 S> */ B(Jump), U8(2), | 150 /* 106 S> */ B(Jump), U8(2), |
151 B(LdaUndefined), | 151 B(LdaUndefined), |
152 /* 115 S> */ B(Return), | 152 /* 115 S> */ B(Return), |
153 ] | 153 ] |
154 constant pool: [ | 154 constant pool: [ |
155 ] | 155 ] |
156 handlers: [ | 156 handlers: [ |
157 ] | 157 ] |
158 | 158 |
159 --- | 159 --- |
160 snippet: " | 160 snippet: " |
161 var a = 1; | 161 var a = 1; |
162 switch(typeof(a)) { | 162 switch(typeof(a)) { |
163 case 2: a = 1; break; | 163 case 2: a = 1; break; |
164 case 3: a = 2; break; | 164 case 3: a = 2; break; |
165 default: a = 3; break; | 165 default: a = 3; break; |
166 } | 166 } |
167 " | 167 " |
168 frame size: 3 | 168 frame size: 3 |
169 parameter count: 1 | 169 parameter count: 1 |
170 bytecode array length: 45 | 170 bytecode array length: 47 |
171 bytecodes: [ | 171 bytecodes: [ |
172 /* 30 E> */ B(StackCheck), | 172 /* 30 E> */ B(StackCheck), |
173 /* 42 S> */ B(LdaSmi), U8(1), | 173 /* 42 S> */ B(LdaSmi), U8(1), |
174 B(Star), R(0), | 174 B(Star), R(0), |
175 /* 42 E> */ B(TypeOf), | 175 /* 42 E> */ B(TypeOf), |
176 B(Star), R(1), | 176 B(Star), R(1), |
177 /* 45 S> */ B(LdaSmi), U8(2), | 177 /* 45 S> */ B(LdaSmi), U8(2), |
178 B(TestEqualStrict), R(1), | 178 B(TestEqualStrict), R(1), U8(1), |
179 B(Mov), R(1), R(2), | 179 B(Mov), R(1), R(2), |
180 B(JumpIfToBooleanTrue), U8(10), | 180 B(JumpIfToBooleanTrue), U8(11), |
181 B(LdaSmi), U8(3), | 181 B(LdaSmi), U8(3), |
182 B(TestEqualStrict), R(2), | 182 B(TestEqualStrict), R(2), U8(2), |
183 B(JumpIfTrue), U8(10), | 183 B(JumpIfTrue), U8(10), |
184 B(Jump), U8(14), | 184 B(Jump), U8(14), |
185 /* 74 S> */ B(LdaSmi), U8(1), | 185 /* 74 S> */ B(LdaSmi), U8(1), |
186 B(Star), R(0), | 186 B(Star), R(0), |
187 /* 81 S> */ B(Jump), U8(14), | 187 /* 81 S> */ B(Jump), U8(14), |
188 /* 97 S> */ B(LdaSmi), U8(2), | 188 /* 97 S> */ B(LdaSmi), U8(2), |
189 B(Star), R(0), | 189 B(Star), R(0), |
190 /* 104 S> */ B(Jump), U8(8), | 190 /* 104 S> */ B(Jump), U8(8), |
191 /* 121 S> */ B(LdaSmi), U8(3), | 191 /* 121 S> */ B(LdaSmi), U8(3), |
192 B(Star), R(0), | 192 B(Star), R(0), |
193 /* 128 S> */ B(Jump), U8(2), | 193 /* 128 S> */ B(Jump), U8(2), |
194 B(LdaUndefined), | 194 B(LdaUndefined), |
195 /* 137 S> */ B(Return), | 195 /* 137 S> */ B(Return), |
196 ] | 196 ] |
197 constant pool: [ | 197 constant pool: [ |
198 ] | 198 ] |
199 handlers: [ | 199 handlers: [ |
200 ] | 200 ] |
201 | 201 |
202 --- | 202 --- |
203 snippet: " | 203 snippet: " |
204 var a = 1; | 204 var a = 1; |
205 switch(a) { | 205 switch(a) { |
206 case typeof(a): a = 1; break; | 206 case typeof(a): a = 1; break; |
207 default: a = 2; break; | 207 default: a = 2; break; |
208 } | 208 } |
209 " | 209 " |
210 frame size: 3 | 210 frame size: 3 |
211 parameter count: 1 | 211 parameter count: 1 |
212 bytecode array length: 31 | 212 bytecode array length: 32 |
213 bytecodes: [ | 213 bytecodes: [ |
214 /* 30 E> */ B(StackCheck), | 214 /* 30 E> */ B(StackCheck), |
215 /* 42 S> */ B(LdaSmi), U8(1), | 215 /* 42 S> */ B(LdaSmi), U8(1), |
216 B(Star), R(0), | 216 B(Star), R(0), |
217 B(Star), R(1), | 217 B(Star), R(1), |
218 /* 45 S> */ B(TypeOf), | 218 /* 45 S> */ B(TypeOf), |
219 B(TestEqualStrict), R(1), | 219 B(TestEqualStrict), R(1), U8(1), |
220 B(Mov), R(0), R(2), | 220 B(Mov), R(0), R(2), |
221 B(JumpIfToBooleanTrue), U8(4), | 221 B(JumpIfToBooleanTrue), U8(4), |
222 B(Jump), U8(8), | 222 B(Jump), U8(8), |
223 /* 74 S> */ B(LdaSmi), U8(1), | 223 /* 74 S> */ B(LdaSmi), U8(1), |
224 B(Star), R(0), | 224 B(Star), R(0), |
225 /* 81 S> */ B(Jump), U8(8), | 225 /* 81 S> */ B(Jump), U8(8), |
226 /* 98 S> */ B(LdaSmi), U8(2), | 226 /* 98 S> */ B(LdaSmi), U8(2), |
227 B(Star), R(0), | 227 B(Star), R(0), |
228 /* 105 S> */ B(Jump), U8(2), | 228 /* 105 S> */ B(Jump), U8(2), |
229 B(LdaUndefined), | 229 B(LdaUndefined), |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 a = 2; | 304 a = 2; |
305 a = 2; | 305 a = 2; |
306 break; | 306 break; |
307 case 2: | 307 case 2: |
308 a = 3; | 308 a = 3; |
309 break; | 309 break; |
310 } | 310 } |
311 " | 311 " |
312 frame size: 3 | 312 frame size: 3 |
313 parameter count: 1 | 313 parameter count: 1 |
314 bytecode array length: 290 | 314 bytecode array length: 292 |
315 bytecodes: [ | 315 bytecodes: [ |
316 /* 30 E> */ B(StackCheck), | 316 /* 30 E> */ B(StackCheck), |
317 /* 42 S> */ B(LdaSmi), U8(1), | 317 /* 42 S> */ B(LdaSmi), U8(1), |
318 B(Star), R(0), | 318 B(Star), R(0), |
319 B(Star), R(1), | 319 B(Star), R(1), |
320 /* 45 S> */ B(LdaSmi), U8(1), | 320 /* 45 S> */ B(LdaSmi), U8(1), |
321 B(TestEqualStrict), R(1), | 321 B(TestEqualStrict), R(1), U8(1), |
322 B(Mov), R(0), R(2), | 322 B(Mov), R(0), R(2), |
323 B(JumpIfToBooleanTrue), U8(10), | 323 B(JumpIfToBooleanTrue), U8(11), |
324 B(LdaSmi), U8(2), | 324 B(LdaSmi), U8(2), |
325 B(TestEqualStrict), R(2), | 325 B(TestEqualStrict), R(2), U8(2), |
326 B(JumpIfTrueConstant), U8(0), | 326 B(JumpIfTrueConstant), U8(0), |
327 B(JumpConstant), U8(1), | 327 B(JumpConstant), U8(1), |
328 /* 68 S> */ B(LdaSmi), U8(2), | 328 /* 68 S> */ B(LdaSmi), U8(2), |
329 B(Star), R(0), | 329 B(Star), R(0), |
330 /* 77 S> */ B(LdaSmi), U8(2), | 330 /* 77 S> */ B(LdaSmi), U8(2), |
331 B(Star), R(0), | 331 B(Star), R(0), |
332 /* 86 S> */ B(LdaSmi), U8(2), | 332 /* 86 S> */ B(LdaSmi), U8(2), |
333 B(Star), R(0), | 333 B(Star), R(0), |
334 /* 95 S> */ B(LdaSmi), U8(2), | 334 /* 95 S> */ B(LdaSmi), U8(2), |
335 B(Star), R(0), | 335 B(Star), R(0), |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 case 1: | 474 case 1: |
475 switch(a + 1) { | 475 switch(a + 1) { |
476 case 2 : a = 1; break; | 476 case 2 : a = 1; break; |
477 default : a = 2; break; | 477 default : a = 2; break; |
478 } // fall-through | 478 } // fall-through |
479 case 2: a = 3; | 479 case 2: a = 3; |
480 } | 480 } |
481 " | 481 " |
482 frame size: 5 | 482 frame size: 5 |
483 parameter count: 1 | 483 parameter count: 1 |
484 bytecode array length: 59 | 484 bytecode array length: 62 |
485 bytecodes: [ | 485 bytecodes: [ |
486 /* 30 E> */ B(StackCheck), | 486 /* 30 E> */ B(StackCheck), |
487 /* 42 S> */ B(LdaSmi), U8(1), | 487 /* 42 S> */ B(LdaSmi), U8(1), |
488 B(Star), R(0), | 488 B(Star), R(0), |
489 B(Star), R(1), | 489 B(Star), R(1), |
490 /* 45 S> */ B(LdaSmi), U8(1), | 490 /* 45 S> */ B(LdaSmi), U8(1), |
491 B(TestEqualStrict), R(1), | 491 B(TestEqualStrict), R(1), U8(4), |
492 B(Mov), R(0), R(3), | 492 B(Mov), R(0), R(3), |
493 B(JumpIfToBooleanTrue), U8(10), | 493 B(JumpIfToBooleanTrue), U8(11), |
494 B(LdaSmi), U8(2), | 494 B(LdaSmi), U8(2), |
495 B(TestEqualStrict), R(3), | 495 B(TestEqualStrict), R(3), U8(5), |
496 B(JumpIfTrue), U8(33), | 496 B(JumpIfTrue), U8(34), |
497 B(Jump), U8(35), | 497 B(Jump), U8(36), |
498 /* 77 E> */ B(AddSmi), U8(1), R(0), U8(1), | 498 /* 77 E> */ B(AddSmi), U8(1), R(0), U8(1), |
499 B(Star), R(2), | 499 B(Star), R(2), |
500 /* 70 S> */ B(LdaSmi), U8(2), | 500 /* 70 S> */ B(LdaSmi), U8(2), |
501 B(TestEqualStrict), R(2), | 501 B(TestEqualStrict), R(2), U8(2), |
502 B(Mov), R(2), R(4), | 502 B(Mov), R(2), R(4), |
503 B(JumpIfToBooleanTrue), U8(4), | 503 B(JumpIfToBooleanTrue), U8(4), |
504 B(Jump), U8(8), | 504 B(Jump), U8(8), |
505 /* 101 S> */ B(LdaSmi), U8(1), | 505 /* 101 S> */ B(LdaSmi), U8(1), |
506 B(Star), R(0), | 506 B(Star), R(0), |
507 /* 108 S> */ B(Jump), U8(8), | 507 /* 108 S> */ B(Jump), U8(8), |
508 /* 131 S> */ B(LdaSmi), U8(2), | 508 /* 131 S> */ B(LdaSmi), U8(2), |
509 B(Star), R(0), | 509 B(Star), R(0), |
510 /* 138 S> */ B(Jump), U8(2), | 510 /* 138 S> */ B(Jump), U8(2), |
511 /* 176 S> */ B(LdaSmi), U8(3), | 511 /* 176 S> */ B(LdaSmi), U8(3), |
512 B(Star), R(0), | 512 B(Star), R(0), |
513 B(LdaUndefined), | 513 B(LdaUndefined), |
514 /* 185 S> */ B(Return), | 514 /* 185 S> */ B(Return), |
515 ] | 515 ] |
516 constant pool: [ | 516 constant pool: [ |
517 ] | 517 ] |
518 handlers: [ | 518 handlers: [ |
519 ] | 519 ] |
520 | 520 |
OLD | NEW |