blob: c908959257da817acda45b957680c9a95416e673 [file] [log] [blame]
Ben Murdochda12d292016-06-02 14:46:10 +01001#
2# Autogenerated by generate-bytecode-expectations.
3#
4
5---
6pool type: number
7execute: yes
8wrap: yes
9
10---
11snippet: "
12 var a = 1;
13 switch(a) {
14 case 1: return 2;
15 case 2: return 3;
16 }
17"
18frame size: 3
19parameter count: 1
20bytecode array length: 31
21bytecodes: [
22 B(StackCheck),
23 B(LdaSmi), U8(1),
24 B(Star), R(1),
25 B(Star), R(0),
26 B(Star), R(2),
27 B(LdaSmi), U8(1),
28 B(TestEqualStrict), R(2),
29 B(JumpIfTrue), U8(10),
30 B(LdaSmi), U8(2),
31 B(TestEqualStrict), R(2),
32 B(JumpIfTrue), U8(7),
33 B(Jump), U8(8),
34 B(LdaSmi), U8(2),
35 B(Return),
36 B(LdaSmi), U8(3),
37 B(Return),
38 B(LdaUndefined),
39 B(Return),
40]
41constant pool: [
42]
43handlers: [
44]
45
46---
47snippet: "
48 var a = 1;
49 switch(a) {
50 case 1: a = 2; break;
51 case 2: a = 3; break;
52 }
53"
54frame size: 3
55parameter count: 1
56bytecode array length: 37
57bytecodes: [
58 B(StackCheck),
59 B(LdaSmi), U8(1),
60 B(Star), R(1),
61 B(Star), R(0),
62 B(Star), R(2),
63 B(LdaSmi), U8(1),
64 B(TestEqualStrict), R(2),
65 B(JumpIfTrue), U8(10),
66 B(LdaSmi), U8(2),
67 B(TestEqualStrict), R(2),
68 B(JumpIfTrue), U8(10),
69 B(Jump), U8(14),
70 B(LdaSmi), U8(2),
71 B(Star), R(1),
72 B(Jump), U8(8),
73 B(LdaSmi), U8(3),
74 B(Star), R(1),
75 B(Jump), U8(2),
76 B(LdaUndefined),
77 B(Return),
78]
79constant pool: [
80]
81handlers: [
82]
83
84---
85snippet: "
86 var a = 1;
87 switch(a) {
88 case 1: a = 2; // fall-through
89 case 2: a = 3; break;
90 }
91"
92frame size: 3
93parameter count: 1
94bytecode array length: 35
95bytecodes: [
96 B(StackCheck),
97 B(LdaSmi), U8(1),
98 B(Star), R(1),
99 B(Star), R(0),
100 B(Star), R(2),
101 B(LdaSmi), U8(1),
102 B(TestEqualStrict), R(2),
103 B(JumpIfTrue), U8(10),
104 B(LdaSmi), U8(2),
105 B(TestEqualStrict), R(2),
106 B(JumpIfTrue), U8(8),
107 B(Jump), U8(12),
108 B(LdaSmi), U8(2),
109 B(Star), R(1),
110 B(LdaSmi), U8(3),
111 B(Star), R(1),
112 B(Jump), U8(2),
113 B(LdaUndefined),
114 B(Return),
115]
116constant pool: [
117]
118handlers: [
119]
120
121---
122snippet: "
123 var a = 1;
124 switch(a) {
125 case 2: break;
126 case 3: break;
127 default: a = 1; break;
128 }
129"
130frame size: 3
131parameter count: 1
132bytecode array length: 35
133bytecodes: [
134 B(StackCheck),
135 B(LdaSmi), U8(1),
136 B(Star), R(1),
137 B(Star), R(0),
138 B(Star), R(2),
139 B(LdaSmi), U8(2),
140 B(TestEqualStrict), R(2),
141 B(JumpIfTrue), U8(10),
142 B(LdaSmi), U8(3),
143 B(TestEqualStrict), R(2),
144 B(JumpIfTrue), U8(6),
145 B(Jump), U8(6),
146 B(Jump), U8(10),
147 B(Jump), U8(8),
148 B(LdaSmi), U8(1),
149 B(Star), R(1),
150 B(Jump), U8(2),
151 B(LdaUndefined),
152 B(Return),
153]
154constant pool: [
155]
156handlers: [
157]
158
159---
160snippet: "
161 var a = 1;
162 switch(typeof(a)) {
163 case 2: a = 1; break;
164 case 3: a = 2; break;
165 default: a = 3; break;
166 }
167"
168frame size: 3
169parameter count: 1
170bytecode array length: 44
171bytecodes: [
172 B(StackCheck),
173 B(LdaSmi), U8(1),
174 B(Star), R(1),
175 B(TypeOf),
176 B(Star), R(0),
177 B(Star), R(2),
178 B(LdaSmi), U8(2),
179 B(TestEqualStrict), R(2),
180 B(JumpIfTrue), U8(10),
181 B(LdaSmi), U8(3),
182 B(TestEqualStrict), R(2),
183 B(JumpIfTrue), U8(10),
184 B(Jump), U8(14),
185 B(LdaSmi), U8(1),
186 B(Star), R(1),
187 B(Jump), U8(14),
188 B(LdaSmi), U8(2),
189 B(Star), R(1),
190 B(Jump), U8(8),
191 B(LdaSmi), U8(3),
192 B(Star), R(1),
193 B(Jump), U8(2),
194 B(LdaUndefined),
195 B(Return),
196]
197constant pool: [
198]
199handlers: [
200]
201
202---
203snippet: "
204 var a = 1;
205 switch(a) {
206 case typeof(a): a = 1; break;
207 default: a = 2; break;
208 }
209"
210frame size: 3
211parameter count: 1
212bytecode array length: 32
213bytecodes: [
214 B(StackCheck),
215 B(LdaSmi), U8(1),
216 B(Star), R(1),
217 B(Star), R(0),
218 B(Star), R(2),
219 B(Ldar), R(1),
220 B(TypeOf),
221 B(TestEqualStrict), R(2),
222 B(JumpIfTrue), U8(4),
223 B(Jump), U8(8),
224 B(LdaSmi), U8(1),
225 B(Star), R(1),
226 B(Jump), U8(8),
227 B(LdaSmi), U8(2),
228 B(Star), R(1),
229 B(Jump), U8(2),
230 B(LdaUndefined),
231 B(Return),
232]
233constant pool: [
234]
235handlers: [
236]
237
238---
239snippet: "
240 var a = 1;
241 switch(a) {
242 case 1:
243 a = 2;
244 a = 2;
245 a = 2;
246 a = 2;
247 a = 2;
248 a = 2;
249 a = 2;
250 a = 2;
251 a = 2;
252 a = 2;
253 a = 2;
254 a = 2;
255 a = 2;
256 a = 2;
257 a = 2;
258 a = 2;
259 a = 2;
260 a = 2;
261 a = 2;
262 a = 2;
263 a = 2;
264 a = 2;
265 a = 2;
266 a = 2;
267 a = 2;
268 a = 2;
269 a = 2;
270 a = 2;
271 a = 2;
272 a = 2;
273 a = 2;
274 a = 2;
275 a = 2;
276 a = 2;
277 a = 2;
278 a = 2;
279 a = 2;
280 a = 2;
281 a = 2;
282 a = 2;
283 a = 2;
284 a = 2;
285 a = 2;
286 a = 2;
287 a = 2;
288 a = 2;
289 a = 2;
290 a = 2;
291 a = 2;
292 a = 2;
293 a = 2;
294 a = 2;
295 a = 2;
296 a = 2;
297 a = 2;
298 a = 2;
299 a = 2;
300 a = 2;
301 a = 2;
302 a = 2;
303 a = 2;
304 a = 2;
305 a = 2;
306 a = 2;
307 break;
308 case 2:
309 a = 3;
310 break;
311 }
312"
313frame size: 3
314parameter count: 1
315bytecode array length: 289
316bytecodes: [
317 B(StackCheck),
318 B(LdaSmi), U8(1),
319 B(Star), R(1),
320 B(Star), R(0),
321 B(Star), R(2),
322 B(LdaSmi), U8(1),
323 B(TestEqualStrict), R(2),
324 B(JumpIfTrue), U8(10),
325 B(LdaSmi), U8(2),
326 B(TestEqualStrict), R(2),
327 B(JumpIfTrueConstant), U8(0),
328 B(JumpConstant), U8(1),
329 B(LdaSmi), U8(2),
330 B(Star), R(1),
331 B(LdaSmi), U8(2),
332 B(Star), R(1),
333 B(LdaSmi), U8(2),
334 B(Star), R(1),
335 B(LdaSmi), U8(2),
336 B(Star), R(1),
337 B(LdaSmi), U8(2),
338 B(Star), R(1),
339 B(LdaSmi), U8(2),
340 B(Star), R(1),
341 B(LdaSmi), U8(2),
342 B(Star), R(1),
343 B(LdaSmi), U8(2),
344 B(Star), R(1),
345 B(LdaSmi), U8(2),
346 B(Star), R(1),
347 B(LdaSmi), U8(2),
348 B(Star), R(1),
349 B(LdaSmi), U8(2),
350 B(Star), R(1),
351 B(LdaSmi), U8(2),
352 B(Star), R(1),
353 B(LdaSmi), U8(2),
354 B(Star), R(1),
355 B(LdaSmi), U8(2),
356 B(Star), R(1),
357 B(LdaSmi), U8(2),
358 B(Star), R(1),
359 B(LdaSmi), U8(2),
360 B(Star), R(1),
361 B(LdaSmi), U8(2),
362 B(Star), R(1),
363 B(LdaSmi), U8(2),
364 B(Star), R(1),
365 B(LdaSmi), U8(2),
366 B(Star), R(1),
367 B(LdaSmi), U8(2),
368 B(Star), R(1),
369 B(LdaSmi), U8(2),
370 B(Star), R(1),
371 B(LdaSmi), U8(2),
372 B(Star), R(1),
373 B(LdaSmi), U8(2),
374 B(Star), R(1),
375 B(LdaSmi), U8(2),
376 B(Star), R(1),
377 B(LdaSmi), U8(2),
378 B(Star), R(1),
379 B(LdaSmi), U8(2),
380 B(Star), R(1),
381 B(LdaSmi), U8(2),
382 B(Star), R(1),
383 B(LdaSmi), U8(2),
384 B(Star), R(1),
385 B(LdaSmi), U8(2),
386 B(Star), R(1),
387 B(LdaSmi), U8(2),
388 B(Star), R(1),
389 B(LdaSmi), U8(2),
390 B(Star), R(1),
391 B(LdaSmi), U8(2),
392 B(Star), R(1),
393 B(LdaSmi), U8(2),
394 B(Star), R(1),
395 B(LdaSmi), U8(2),
396 B(Star), R(1),
397 B(LdaSmi), U8(2),
398 B(Star), R(1),
399 B(LdaSmi), U8(2),
400 B(Star), R(1),
401 B(LdaSmi), U8(2),
402 B(Star), R(1),
403 B(LdaSmi), U8(2),
404 B(Star), R(1),
405 B(LdaSmi), U8(2),
406 B(Star), R(1),
407 B(LdaSmi), U8(2),
408 B(Star), R(1),
409 B(LdaSmi), U8(2),
410 B(Star), R(1),
411 B(LdaSmi), U8(2),
412 B(Star), R(1),
413 B(LdaSmi), U8(2),
414 B(Star), R(1),
415 B(LdaSmi), U8(2),
416 B(Star), R(1),
417 B(LdaSmi), U8(2),
418 B(Star), R(1),
419 B(LdaSmi), U8(2),
420 B(Star), R(1),
421 B(LdaSmi), U8(2),
422 B(Star), R(1),
423 B(LdaSmi), U8(2),
424 B(Star), R(1),
425 B(LdaSmi), U8(2),
426 B(Star), R(1),
427 B(LdaSmi), U8(2),
428 B(Star), R(1),
429 B(LdaSmi), U8(2),
430 B(Star), R(1),
431 B(LdaSmi), U8(2),
432 B(Star), R(1),
433 B(LdaSmi), U8(2),
434 B(Star), R(1),
435 B(LdaSmi), U8(2),
436 B(Star), R(1),
437 B(LdaSmi), U8(2),
438 B(Star), R(1),
439 B(LdaSmi), U8(2),
440 B(Star), R(1),
441 B(LdaSmi), U8(2),
442 B(Star), R(1),
443 B(LdaSmi), U8(2),
444 B(Star), R(1),
445 B(LdaSmi), U8(2),
446 B(Star), R(1),
447 B(LdaSmi), U8(2),
448 B(Star), R(1),
449 B(LdaSmi), U8(2),
450 B(Star), R(1),
451 B(LdaSmi), U8(2),
452 B(Star), R(1),
453 B(LdaSmi), U8(2),
454 B(Star), R(1),
455 B(LdaSmi), U8(2),
456 B(Star), R(1),
457 B(Jump), U8(8),
458 B(LdaSmi), U8(3),
459 B(Star), R(1),
460 B(Jump), U8(2),
461 B(LdaUndefined),
462 B(Return),
463]
464constant pool: [
465 262,
466 266,
467]
468handlers: [
469]
470
471---
472snippet: "
473 var a = 1;
474 switch(a) {
475 case 1:
476 switch(a + 1) {
477 case 2 : a = 1; break;
478 default : a = 2; break;
479 } // fall-through
480 case 2: a = 3;
481 }
482"
483frame size: 5
484parameter count: 1
485bytecode array length: 61
486bytecodes: [
487 B(StackCheck),
488 B(LdaSmi), U8(1),
489 B(Star), R(2),
490 B(Star), R(0),
491 B(Star), R(3),
492 B(LdaSmi), U8(1),
493 B(TestEqualStrict), R(3),
494 B(JumpIfTrue), U8(10),
495 B(LdaSmi), U8(2),
496 B(TestEqualStrict), R(3),
497 B(JumpIfTrue), U8(36),
498 B(Jump), U8(38),
499 B(Ldar), R(2),
500 B(Star), R(4),
501 B(LdaSmi), U8(1),
502 B(Add), R(4),
503 B(Star), R(1),
504 B(Star), R(4),
505 B(LdaSmi), U8(2),
506 B(TestEqualStrict), R(4),
507 B(JumpIfTrue), U8(4),
508 B(Jump), U8(8),
509 B(LdaSmi), U8(1),
510 B(Star), R(2),
511 B(Jump), U8(8),
512 B(LdaSmi), U8(2),
513 B(Star), R(2),
514 B(Jump), U8(2),
515 B(LdaSmi), U8(3),
516 B(Star), R(2),
517 B(LdaUndefined),
518 B(Return),
519]
520constant pool: [
521]
522handlers: [
523]
524