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

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

Issue 1717293002: [Interpreter] Refactor bytecode generator test suite. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: std::vector instead of initializer_list, golden path as constant. 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 # in multiples of sizeof(void*)
19 parameter count: 1
20 bytecodes: [
21 B(StackCheck),
22 B(LdaSmi8), U8(1),
23 B(Star), R(1),
24 B(Star), R(0),
25 B(Star), R(2),
26 B(LdaSmi8), U8(1),
27 B(TestEqualStrict), R(2),
28 B(JumpIfTrue), U8(10),
29 B(LdaSmi8), U8(2),
30 B(TestEqualStrict), R(2),
31 B(JumpIfTrue), U8(7),
32 B(Jump), U8(8),
33 B(LdaSmi8), U8(2),
34 B(Return),
35 B(LdaSmi8), U8(3),
36 B(Return),
37 B(LdaUndefined),
38 B(Return),
39 ]
40 constant pool: [
41 ]
42 handlers: [
43 ]
44
45 ---
46 snippet: "
47 var a = 1;
48 switch(a) {
49 case 1: a = 2; break;
50 case 2: a = 3; break;
51 }
52 "
53 frame size: 3 # in multiples of sizeof(void*)
54 parameter count: 1
55 bytecodes: [
56 B(StackCheck),
57 B(LdaSmi8), U8(1),
58 B(Star), R(1),
59 B(Star), R(0),
60 B(Star), R(2),
61 B(LdaSmi8), U8(1),
62 B(TestEqualStrict), R(2),
63 B(JumpIfTrue), U8(10),
64 B(LdaSmi8), U8(2),
65 B(TestEqualStrict), R(2),
66 B(JumpIfTrue), U8(10),
67 B(Jump), U8(14),
68 B(LdaSmi8), U8(2),
69 B(Star), R(1),
70 B(Jump), U8(8),
71 B(LdaSmi8), U8(3),
72 B(Star), R(1),
73 B(Jump), U8(2),
74 B(LdaUndefined),
75 B(Return),
76 ]
77 constant pool: [
78 ]
79 handlers: [
80 ]
81
82 ---
83 snippet: "
84 var a = 1;
85 switch(a) {
86 case 1: a = 2; // fall-through
87 case 2: a = 3; break;
88 }
89 "
90 frame size: 3 # in multiples of sizeof(void*)
91 parameter count: 1
92 bytecodes: [
93 B(StackCheck),
94 B(LdaSmi8), U8(1),
95 B(Star), R(1),
96 B(Star), R(0),
97 B(Star), R(2),
98 B(LdaSmi8), U8(1),
99 B(TestEqualStrict), R(2),
100 B(JumpIfTrue), U8(10),
101 B(LdaSmi8), U8(2),
102 B(TestEqualStrict), R(2),
103 B(JumpIfTrue), U8(8),
104 B(Jump), U8(12),
105 B(LdaSmi8), U8(2),
106 B(Star), R(1),
107 B(LdaSmi8), U8(3),
108 B(Star), R(1),
109 B(Jump), U8(2),
110 B(LdaUndefined),
111 B(Return),
112 ]
113 constant pool: [
114 ]
115 handlers: [
116 ]
117
118 ---
119 snippet: "
120 var a = 1;
121 switch(a) {
122 case 2: break;
123 case 3: break;
124 default: a = 1; break;
125 }
126 "
127 frame size: 3 # in multiples of sizeof(void*)
128 parameter count: 1
129 bytecodes: [
130 B(StackCheck),
131 B(LdaSmi8), U8(1),
132 B(Star), R(1),
133 B(Star), R(0),
134 B(Star), R(2),
135 B(LdaSmi8), U8(2),
136 B(TestEqualStrict), R(2),
137 B(JumpIfTrue), U8(10),
138 B(LdaSmi8), U8(3),
139 B(TestEqualStrict), R(2),
140 B(JumpIfTrue), U8(6),
141 B(Jump), U8(6),
142 B(Jump), U8(10),
143 B(Jump), U8(8),
144 B(LdaSmi8), U8(1),
145 B(Star), R(1),
146 B(Jump), U8(2),
147 B(LdaUndefined),
148 B(Return),
149 ]
150 constant pool: [
151 ]
152 handlers: [
153 ]
154
155 ---
156 snippet: "
157 var a = 1;
158 switch(typeof(a)) {
159 case 2: a = 1; break;
160 case 3: a = 2; break;
161 default: a = 3; break;
162 }
163 "
164 frame size: 3 # in multiples of sizeof(void*)
165 parameter count: 1
166 bytecodes: [
167 B(StackCheck),
168 B(LdaSmi8), U8(1),
169 B(Star), R(1),
170 B(TypeOf),
171 B(Star), R(0),
172 B(Star), R(2),
173 B(LdaSmi8), U8(2),
174 B(TestEqualStrict), R(2),
175 B(JumpIfTrue), U8(10),
176 B(LdaSmi8), U8(3),
177 B(TestEqualStrict), R(2),
178 B(JumpIfTrue), U8(10),
179 B(Jump), U8(14),
180 B(LdaSmi8), U8(1),
181 B(Star), R(1),
182 B(Jump), U8(14),
183 B(LdaSmi8), U8(2),
184 B(Star), R(1),
185 B(Jump), U8(8),
186 B(LdaSmi8), U8(3),
187 B(Star), R(1),
188 B(Jump), U8(2),
189 B(LdaUndefined),
190 B(Return),
191 ]
192 constant pool: [
193 ]
194 handlers: [
195 ]
196
197 ---
198 snippet: "
199 var a = 1;
200 switch(a) {
201 case typeof(a): a = 1; break;
202 default: a = 2; break;
203 }
204 "
205 frame size: 3 # in multiples of sizeof(void*)
206 parameter count: 1
207 bytecodes: [
208 B(StackCheck),
209 B(LdaSmi8), U8(1),
210 B(Star), R(1),
211 B(Star), R(0),
212 B(Star), R(2),
213 B(Ldar), R(1),
214 B(TypeOf),
215 B(TestEqualStrict), R(2),
216 B(JumpIfTrue), U8(4),
217 B(Jump), U8(8),
218 B(LdaSmi8), U8(1),
219 B(Star), R(1),
220 B(Jump), U8(8),
221 B(LdaSmi8), U8(2),
222 B(Star), R(1),
223 B(Jump), U8(2),
224 B(LdaUndefined),
225 B(Return),
226 ]
227 constant pool: [
228 ]
229 handlers: [
230 ]
231
232 ---
233 snippet: "
234 var a = 1;
235 switch(a) {
236 case 1:
237 a = 2;
238 a = 2;
239 a = 2;
240 a = 2;
241 a = 2;
242 a = 2;
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 break;
302 case 2: a = 3; break;}
303 "
304 frame size: 3 # in multiples of sizeof(void*)
305 parameter count: 1
306 bytecodes: [
307 B(StackCheck),
308 B(LdaSmi8), U8(1),
309 B(Star), R(1),
310 B(Star), R(0),
311 B(Star), R(2),
312 B(LdaSmi8), U8(1),
313 B(TestEqualStrict), R(2),
314 B(JumpIfTrue), U8(10),
315 B(LdaSmi8), U8(2),
316 B(TestEqualStrict), R(2),
317 B(JumpIfTrueConstant), U8(0),
318 B(JumpConstant), U8(1),
319 B(LdaSmi8), U8(2),
320 B(Star), R(1),
321 B(LdaSmi8), U8(2),
322 B(Star), R(1),
323 B(LdaSmi8), U8(2),
324 B(Star), R(1),
325 B(LdaSmi8), U8(2),
326 B(Star), R(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(Jump), U8(8),
448 B(LdaSmi8), U8(3),
449 B(Star), R(1),
450 B(Jump), U8(2),
451 B(LdaUndefined),
452 B(Return),
453 ]
454 constant pool: [
455 262,
456 266,
457 ]
458 handlers: [
459 ]
460
461 ---
462 snippet: "
463 var a = 1;
464 switch(a) {
465 case 1:
466 switch(a + 1) {
467 case 2 : a = 1; break;
468 default : a = 2; break;
469 } // fall-through
470 case 2: a = 3;
471 }
472 "
473 frame size: 5 # in multiples of sizeof(void*)
474 parameter count: 1
475 bytecodes: [
476 B(StackCheck),
477 B(LdaSmi8), U8(1),
478 B(Star), R(2),
479 B(Star), R(0),
480 B(Star), R(3),
481 B(LdaSmi8), U8(1),
482 B(TestEqualStrict), R(3),
483 B(JumpIfTrue), U8(10),
484 B(LdaSmi8), U8(2),
485 B(TestEqualStrict), R(3),
486 B(JumpIfTrue), U8(36),
487 B(Jump), U8(38),
488 B(Ldar), R(2),
489 B(Star), R(4),
490 B(LdaSmi8), U8(1),
491 B(Add), R(4),
492 B(Star), R(1),
493 B(Star), R(4),
494 B(LdaSmi8), U8(2),
495 B(TestEqualStrict), R(4),
496 B(JumpIfTrue), U8(4),
497 B(Jump), U8(8),
498 B(LdaSmi8), U8(1),
499 B(Star), R(2),
500 B(Jump), U8(8),
501 B(LdaSmi8), U8(2),
502 B(Star), R(2),
503 B(Jump), U8(2),
504 B(LdaSmi8), U8(3),
505 B(Star), R(2),
506 B(LdaUndefined),
507 B(Return),
508 ]
509 constant pool: [
510 ]
511 handlers: [
512 ]
513
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698