Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(403)

Side by Side Diff: test/cctest/interpreter/bytecode_expectations/Switch.golden

Issue 1717293002: [Interpreter] Refactor bytecode generator test suite. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move golden files to subdir, update golden format. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #
2 # Autogenerated by generate-bytecode-expectations
3 #
4
5 ---
6 pool type: number
7 execute: yes
8 wrap: yes
9
10 ---
11 snippet: "
12 var a = 1;
13 switch(a) {
14 case 1: return 2;
15 case 2: return 3;
16 }
17 "
18 frame size: 3
19 parameter count: 1
20 bytecode array length: 31
21 bytecodes: [
22 B(StackCheck),
23 B(LdaSmi8), U8(1),
24 B(Star), R(1),
25 B(Star), R(0),
26 B(Star), R(2),
27 B(LdaSmi8), U8(1),
28 B(TestEqualStrict), R(2),
29 B(JumpIfTrue), U8(10),
30 B(LdaSmi8), U8(2),
31 B(TestEqualStrict), R(2),
32 B(JumpIfTrue), U8(7),
33 B(Jump), U8(8),
34 B(LdaSmi8), U8(2),
35 B(Return),
36 B(LdaSmi8), U8(3),
37 B(Return),
38 B(LdaUndefined),
39 B(Return),
40 ]
41 constant pool: [
42 ]
43 handlers: [
44 ]
45
46 ---
47 snippet: "
48 var a = 1;
49 switch(a) {
50 case 1: a = 2; break;
51 case 2: a = 3; break;
52 }
53 "
54 frame size: 3
55 parameter count: 1
56 bytecode array length: 37
57 bytecodes: [
58 B(StackCheck),
59 B(LdaSmi8), U8(1),
60 B(Star), R(1),
61 B(Star), R(0),
62 B(Star), R(2),
63 B(LdaSmi8), U8(1),
64 B(TestEqualStrict), R(2),
65 B(JumpIfTrue), U8(10),
66 B(LdaSmi8), U8(2),
67 B(TestEqualStrict), R(2),
68 B(JumpIfTrue), U8(10),
69 B(Jump), U8(14),
70 B(LdaSmi8), U8(2),
71 B(Star), R(1),
72 B(Jump), U8(8),
73 B(LdaSmi8), U8(3),
74 B(Star), R(1),
75 B(Jump), U8(2),
76 B(LdaUndefined),
77 B(Return),
78 ]
79 constant pool: [
80 ]
81 handlers: [
82 ]
83
84 ---
85 snippet: "
86 var a = 1;
87 switch(a) {
88 case 1: a = 2; // fall-through
89 case 2: a = 3; break;
90 }
91 "
92 frame size: 3
93 parameter count: 1
94 bytecode array length: 35
95 bytecodes: [
96 B(StackCheck),
97 B(LdaSmi8), U8(1),
98 B(Star), R(1),
99 B(Star), R(0),
100 B(Star), R(2),
101 B(LdaSmi8), U8(1),
102 B(TestEqualStrict), R(2),
103 B(JumpIfTrue), U8(10),
104 B(LdaSmi8), U8(2),
105 B(TestEqualStrict), R(2),
106 B(JumpIfTrue), U8(8),
107 B(Jump), U8(12),
108 B(LdaSmi8), U8(2),
109 B(Star), R(1),
110 B(LdaSmi8), U8(3),
111 B(Star), R(1),
112 B(Jump), U8(2),
113 B(LdaUndefined),
114 B(Return),
115 ]
116 constant pool: [
117 ]
118 handlers: [
119 ]
120
121 ---
122 snippet: "
123 var a = 1;
124 switch(a) {
125 case 2: break;
126 case 3: break;
127 default: a = 1; break;
128 }
129 "
130 frame size: 3
131 parameter count: 1
132 bytecode array length: 35
133 bytecodes: [
134 B(StackCheck),
135 B(LdaSmi8), U8(1),
136 B(Star), R(1),
137 B(Star), R(0),
138 B(Star), R(2),
139 B(LdaSmi8), U8(2),
140 B(TestEqualStrict), R(2),
141 B(JumpIfTrue), U8(10),
142 B(LdaSmi8), 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(LdaSmi8), U8(1),
149 B(Star), R(1),
150 B(Jump), U8(2),
151 B(LdaUndefined),
152 B(Return),
153 ]
154 constant pool: [
155 ]
156 handlers: [
157 ]
158
159 ---
160 snippet: "
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 "
168 frame size: 3
169 parameter count: 1
170 bytecode array length: 44
171 bytecodes: [
172 B(StackCheck),
173 B(LdaSmi8), U8(1),
174 B(Star), R(1),
175 B(TypeOf),
176 B(Star), R(0),
177 B(Star), R(2),
178 B(LdaSmi8), U8(2),
179 B(TestEqualStrict), R(2),
180 B(JumpIfTrue), U8(10),
181 B(LdaSmi8), U8(3),
182 B(TestEqualStrict), R(2),
183 B(JumpIfTrue), U8(10),
184 B(Jump), U8(14),
185 B(LdaSmi8), U8(1),
186 B(Star), R(1),
187 B(Jump), U8(14),
188 B(LdaSmi8), U8(2),
189 B(Star), R(1),
190 B(Jump), U8(8),
191 B(LdaSmi8), U8(3),
192 B(Star), R(1),
193 B(Jump), U8(2),
194 B(LdaUndefined),
195 B(Return),
196 ]
197 constant pool: [
198 ]
199 handlers: [
200 ]
201
202 ---
203 snippet: "
204 var a = 1;
205 switch(a) {
206 case typeof(a): a = 1; break;
207 default: a = 2; break;
208 }
209 "
210 frame size: 3
211 parameter count: 1
212 bytecode array length: 32
213 bytecodes: [
214 B(StackCheck),
215 B(LdaSmi8), 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(LdaSmi8), U8(1),
225 B(Star), R(1),
226 B(Jump), U8(8),
227 B(LdaSmi8), U8(2),
228 B(Star), R(1),
229 B(Jump), U8(2),
230 B(LdaUndefined),
231 B(Return),
232 ]
233 constant pool: [
234 ]
235 handlers: [
236 ]
237
238 ---
239 snippet: "
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;
rmcilroy 2016/02/24 08:55:35 indentation
Stefano Sanfilippo 2016/02/24 14:55:01 Done.
308 case 2: a = 3; break;
309 }
310 "
311 frame size: 3
312 parameter count: 1
313 bytecode array length: 289
314 bytecodes: [
315 B(StackCheck),
316 B(LdaSmi8), U8(1),
317 B(Star), R(1),
318 B(Star), R(0),
319 B(Star), R(2),
320 B(LdaSmi8), U8(1),
321 B(TestEqualStrict), R(2),
322 B(JumpIfTrue), U8(10),
323 B(LdaSmi8), U8(2),
324 B(TestEqualStrict), R(2),
325 B(JumpIfTrueConstant), U8(0),
326 B(JumpConstant), U8(1),
327 B(LdaSmi8), U8(2),
328 B(Star), R(1),
329 B(LdaSmi8), U8(2),
330 B(Star), R(1),
331 B(LdaSmi8), U8(2),
332 B(Star), R(1),
333 B(LdaSmi8), U8(2),
334 B(Star), R(1),
335 B(LdaSmi8), U8(2),
336 B(Star), R(1),
337 B(LdaSmi8), U8(2),
338 B(Star), R(1),
339 B(LdaSmi8), U8(2),
340 B(Star), R(1),
341 B(LdaSmi8), U8(2),
342 B(Star), R(1),
343 B(LdaSmi8), U8(2),
344 B(Star), R(1),
345 B(LdaSmi8), U8(2),
346 B(Star), R(1),
347 B(LdaSmi8), U8(2),
348 B(Star), R(1),
349 B(LdaSmi8), U8(2),
350 B(Star), R(1),
351 B(LdaSmi8), U8(2),
352 B(Star), R(1),
353 B(LdaSmi8), U8(2),
354 B(Star), R(1),
355 B(LdaSmi8), U8(2),
356 B(Star), R(1),
357 B(LdaSmi8), U8(2),
358 B(Star), R(1),
359 B(LdaSmi8), U8(2),
360 B(Star), R(1),
361 B(LdaSmi8), U8(2),
362 B(Star), R(1),
363 B(LdaSmi8), U8(2),
364 B(Star), R(1),
365 B(LdaSmi8), U8(2),
366 B(Star), R(1),
367 B(LdaSmi8), U8(2),
368 B(Star), R(1),
369 B(LdaSmi8), U8(2),
370 B(Star), R(1),
371 B(LdaSmi8), U8(2),
372 B(Star), R(1),
373 B(LdaSmi8), U8(2),
374 B(Star), R(1),
375 B(LdaSmi8), U8(2),
376 B(Star), R(1),
377 B(LdaSmi8), U8(2),
378 B(Star), R(1),
379 B(LdaSmi8), U8(2),
380 B(Star), R(1),
381 B(LdaSmi8), U8(2),
382 B(Star), R(1),
383 B(LdaSmi8), U8(2),
384 B(Star), R(1),
385 B(LdaSmi8), U8(2),
386 B(Star), R(1),
387 B(LdaSmi8), U8(2),
388 B(Star), R(1),
389 B(LdaSmi8), U8(2),
390 B(Star), R(1),
391 B(LdaSmi8), U8(2),
392 B(Star), R(1),
393 B(LdaSmi8), U8(2),
394 B(Star), R(1),
395 B(LdaSmi8), U8(2),
396 B(Star), R(1),
397 B(LdaSmi8), U8(2),
398 B(Star), R(1),
399 B(LdaSmi8), U8(2),
400 B(Star), R(1),
401 B(LdaSmi8), U8(2),
402 B(Star), R(1),
403 B(LdaSmi8), U8(2),
404 B(Star), R(1),
405 B(LdaSmi8), U8(2),
406 B(Star), R(1),
407 B(LdaSmi8), U8(2),
408 B(Star), R(1),
409 B(LdaSmi8), U8(2),
410 B(Star), R(1),
411 B(LdaSmi8), U8(2),
412 B(Star), R(1),
413 B(LdaSmi8), U8(2),
414 B(Star), R(1),
415 B(LdaSmi8), U8(2),
416 B(Star), R(1),
417 B(LdaSmi8), U8(2),
418 B(Star), R(1),
419 B(LdaSmi8), U8(2),
420 B(Star), R(1),
421 B(LdaSmi8), U8(2),
422 B(Star), R(1),
423 B(LdaSmi8), U8(2),
424 B(Star), R(1),
425 B(LdaSmi8), U8(2),
426 B(Star), R(1),
427 B(LdaSmi8), U8(2),
428 B(Star), R(1),
429 B(LdaSmi8), U8(2),
430 B(Star), R(1),
431 B(LdaSmi8), U8(2),
432 B(Star), R(1),
433 B(LdaSmi8), U8(2),
434 B(Star), R(1),
435 B(LdaSmi8), U8(2),
436 B(Star), R(1),
437 B(LdaSmi8), U8(2),
438 B(Star), R(1),
439 B(LdaSmi8), U8(2),
440 B(Star), R(1),
441 B(LdaSmi8), U8(2),
442 B(Star), R(1),
443 B(LdaSmi8), U8(2),
444 B(Star), R(1),
445 B(LdaSmi8), U8(2),
446 B(Star), R(1),
447 B(LdaSmi8), U8(2),
448 B(Star), R(1),
449 B(LdaSmi8), U8(2),
450 B(Star), R(1),
451 B(LdaSmi8), U8(2),
452 B(Star), R(1),
453 B(LdaSmi8), U8(2),
454 B(Star), R(1),
455 B(Jump), U8(8),
456 B(LdaSmi8), U8(3),
457 B(Star), R(1),
458 B(Jump), U8(2),
459 B(LdaUndefined),
460 B(Return),
461 ]
462 constant pool: [
463 262,
464 266,
465 ]
466 handlers: [
467 ]
468
469 ---
470 snippet: "
471 var a = 1;
472 switch(a) {
473 case 1:
474 switch(a + 1) {
475 case 2 : a = 1; break;
476 default : a = 2; break;
477 } // fall-through
478 case 2: a = 3;
479 }
480 "
481 frame size: 5
482 parameter count: 1
483 bytecode array length: 61
484 bytecodes: [
485 B(StackCheck),
486 B(LdaSmi8), U8(1),
487 B(Star), R(2),
488 B(Star), R(0),
489 B(Star), R(3),
490 B(LdaSmi8), U8(1),
491 B(TestEqualStrict), R(3),
492 B(JumpIfTrue), U8(10),
493 B(LdaSmi8), U8(2),
494 B(TestEqualStrict), R(3),
495 B(JumpIfTrue), U8(36),
496 B(Jump), U8(38),
497 B(Ldar), R(2),
498 B(Star), R(4),
499 B(LdaSmi8), U8(1),
500 B(Add), R(4),
501 B(Star), R(1),
502 B(Star), R(4),
503 B(LdaSmi8), U8(2),
504 B(TestEqualStrict), R(4),
505 B(JumpIfTrue), U8(4),
506 B(Jump), U8(8),
507 B(LdaSmi8), U8(1),
508 B(Star), R(2),
509 B(Jump), U8(8),
510 B(LdaSmi8), U8(2),
511 B(Star), R(2),
512 B(Jump), U8(2),
513 B(LdaSmi8), U8(3),
514 B(Star), R(2),
515 B(LdaUndefined),
516 B(Return),
517 ]
518 constant pool: [
519 ]
520 handlers: [
521 ]
522
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698