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

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

Issue 2793923002: [Interpreter] Optimize code of the form 'if (x === undefined)'. (Closed)
Patch Set: Rebase Created 3 years, 8 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
1 # 1 #
2 # Autogenerated by generate-bytecode-expectations. 2 # Autogenerated by generate-bytecode-expectations.
3 # 3 #
4 4
5 --- 5 ---
6 wrap: yes 6 wrap: yes
7 7
8 --- 8 ---
9 snippet: " 9 snippet: "
10 for (var p of [0, 1, 2]) {} 10 for (var p of [0, 1, 2]) {}
11 " 11 "
12 frame size: 15 12 frame size: 15
13 parameter count: 1 13 parameter count: 1
14 bytecode array length: 263 14 bytecode array length: 262
15 bytecodes: [ 15 bytecodes: [
16 /* 30 E> */ B(StackCheck), 16 /* 30 E> */ B(StackCheck),
17 B(LdaZero), 17 B(LdaZero),
18 B(Star), R(4), 18 B(Star), R(4),
19 B(Mov), R(context), R(11), 19 B(Mov), R(context), R(11),
20 B(Mov), R(context), R(12), 20 B(Mov), R(context), R(12),
21 /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(9), 21 /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(9),
22 B(Star), R(13), 22 B(Star), R(13),
23 B(LdaNamedProperty), R(13), U8(1), U8(3), 23 B(LdaNamedProperty), R(13), U8(1), U8(3),
24 B(Star), R(14), 24 B(Star), R(14),
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 B(Star), R(9), 65 B(Star), R(9),
66 B(Jump), U8(7), 66 B(Jump), U8(7),
67 B(Star), R(10), 67 B(Star), R(10),
68 B(LdaZero), 68 B(LdaZero),
69 B(Star), R(9), 69 B(Star), R(9),
70 B(LdaTheHole), 70 B(LdaTheHole),
71 B(SetPendingMessage), 71 B(SetPendingMessage),
72 B(Star), R(11), 72 B(Star), R(11),
73 B(LdaZero), 73 B(LdaZero),
74 B(TestEqualStrict), R(4), U8(16), 74 B(TestEqualStrict), R(4), U8(16),
75 B(JumpIfTrue), U8(105), 75 B(JumpIfTrue), U8(104),
76 B(LdaNamedProperty), R(2), U8(7), U8(17), 76 B(LdaNamedProperty), R(2), U8(7), U8(17),
77 B(Star), R(6), 77 B(Star), R(6),
78 B(TestUndetectable), R(6), 78 B(TestUndetectable),
79 B(JumpIfFalse), U8(4), 79 B(JumpIfFalse), U8(4),
80 B(Jump), U8(93), 80 B(Jump), U8(93),
81 B(LdaSmi), I8(1), 81 B(LdaSmi), I8(1),
82 B(TestEqualStrict), R(4), U8(20), 82 B(TestEqualStrict), R(4), U8(20),
83 B(JumpIfFalse), U8(61), 83 B(JumpIfFalse), U8(61),
84 B(Ldar), R(6), 84 B(Ldar), R(6),
85 B(TestTypeOf), U8(5), 85 B(TestTypeOf), U8(5),
86 B(JumpIfFalse), U8(4), 86 B(JumpIfFalse), U8(4),
87 B(Jump), U8(18), 87 B(Jump), U8(18),
88 B(Wide), B(LdaSmi), I16(132), 88 B(Wide), B(LdaSmi), I16(132),
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"], 133 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
134 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"], 134 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
135 FIXED_ARRAY_TYPE, 135 FIXED_ARRAY_TYPE,
136 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], 136 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
137 ONE_BYTE_INTERNALIZED_STRING_TYPE [""], 137 ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
138 FIXED_ARRAY_TYPE, 138 FIXED_ARRAY_TYPE,
139 ] 139 ]
140 handlers: [ 140 handlers: [
141 [7, 124, 130], 141 [7, 124, 130],
142 [10, 88, 90], 142 [10, 88, 90],
143 [191, 201, 203], 143 [190, 200, 202],
144 ] 144 ]
145 145
146 --- 146 ---
147 snippet: " 147 snippet: "
148 var x = 'potatoes'; 148 var x = 'potatoes';
149 for (var p of x) { return p; } 149 for (var p of x) { return p; }
150 " 150 "
151 frame size: 16 151 frame size: 16
152 parameter count: 1 152 parameter count: 1
153 bytecode array length: 276 153 bytecode array length: 275
154 bytecodes: [ 154 bytecodes: [
155 /* 30 E> */ B(StackCheck), 155 /* 30 E> */ B(StackCheck),
156 /* 42 S> */ B(LdaConstant), U8(0), 156 /* 42 S> */ B(LdaConstant), U8(0),
157 B(Star), R(0), 157 B(Star), R(0),
158 B(LdaZero), 158 B(LdaZero),
159 B(Star), R(5), 159 B(Star), R(5),
160 B(Mov), R(context), R(12), 160 B(Mov), R(context), R(12),
161 B(Mov), R(context), R(13), 161 B(Mov), R(context), R(13),
162 /* 68 S> */ B(LdaNamedProperty), R(0), U8(1), U8(2), 162 /* 68 S> */ B(LdaNamedProperty), R(0), U8(1), U8(2),
163 B(Star), R(15), 163 B(Star), R(15),
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 B(Star), R(10), 206 B(Star), R(10),
207 B(Jump), U8(8), 207 B(Jump), U8(8),
208 B(Star), R(11), 208 B(Star), R(11),
209 B(LdaSmi), I8(1), 209 B(LdaSmi), I8(1),
210 B(Star), R(10), 210 B(Star), R(10),
211 B(LdaTheHole), 211 B(LdaTheHole),
212 B(SetPendingMessage), 212 B(SetPendingMessage),
213 B(Star), R(12), 213 B(Star), R(12),
214 B(LdaZero), 214 B(LdaZero),
215 B(TestEqualStrict), R(5), U8(15), 215 B(TestEqualStrict), R(5), U8(15),
216 B(JumpIfTrue), U8(105), 216 B(JumpIfTrue), U8(104),
217 B(LdaNamedProperty), R(3), U8(7), U8(16), 217 B(LdaNamedProperty), R(3), U8(7), U8(16),
218 B(Star), R(7), 218 B(Star), R(7),
219 B(TestUndetectable), R(7), 219 B(TestUndetectable),
220 B(JumpIfFalse), U8(4), 220 B(JumpIfFalse), U8(4),
221 B(Jump), U8(93), 221 B(Jump), U8(93),
222 B(LdaSmi), I8(1), 222 B(LdaSmi), I8(1),
223 B(TestEqualStrict), R(5), U8(19), 223 B(TestEqualStrict), R(5), U8(19),
224 B(JumpIfFalse), U8(61), 224 B(JumpIfFalse), U8(61),
225 B(Ldar), R(7), 225 B(Ldar), R(7),
226 B(TestTypeOf), U8(5), 226 B(TestTypeOf), U8(5),
227 B(JumpIfFalse), U8(4), 227 B(JumpIfFalse), U8(4),
228 B(Jump), U8(18), 228 B(Jump), U8(18),
229 B(Wide), B(LdaSmi), I16(132), 229 B(Wide), B(LdaSmi), I16(132),
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"], 279 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
280 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"], 280 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
281 FIXED_ARRAY_TYPE, 281 FIXED_ARRAY_TYPE,
282 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], 282 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
283 ONE_BYTE_INTERNALIZED_STRING_TYPE [""], 283 ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
284 FIXED_ARRAY_TYPE, 284 FIXED_ARRAY_TYPE,
285 ] 285 ]
286 handlers: [ 286 handlers: [
287 [11, 127, 133], 287 [11, 127, 133],
288 [14, 91, 93], 288 [14, 91, 93],
289 [195, 205, 207], 289 [194, 204, 206],
290 ] 290 ]
291 291
292 --- 292 ---
293 snippet: " 293 snippet: "
294 for (var x of [10, 20, 30]) { 294 for (var x of [10, 20, 30]) {
295 if (x == 10) continue; 295 if (x == 10) continue;
296 if (x == 20) break; 296 if (x == 20) break;
297 } 297 }
298 " 298 "
299 frame size: 15 299 frame size: 15
300 parameter count: 1 300 parameter count: 1
301 bytecode array length: 281 301 bytecode array length: 280
302 bytecodes: [ 302 bytecodes: [
303 /* 30 E> */ B(StackCheck), 303 /* 30 E> */ B(StackCheck),
304 B(LdaZero), 304 B(LdaZero),
305 B(Star), R(4), 305 B(Star), R(4),
306 B(Mov), R(context), R(11), 306 B(Mov), R(context), R(11),
307 B(Mov), R(context), R(12), 307 B(Mov), R(context), R(12),
308 /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(9), 308 /* 48 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(9),
309 B(Star), R(13), 309 B(Star), R(13),
310 B(LdaNamedProperty), R(13), U8(1), U8(3), 310 B(LdaNamedProperty), R(13), U8(1), U8(3),
311 B(Star), R(14), 311 B(Star), R(14),
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 B(Star), R(9), 360 B(Star), R(9),
361 B(Jump), U8(7), 361 B(Jump), U8(7),
362 B(Star), R(10), 362 B(Star), R(10),
363 B(LdaZero), 363 B(LdaZero),
364 B(Star), R(9), 364 B(Star), R(9),
365 B(LdaTheHole), 365 B(LdaTheHole),
366 B(SetPendingMessage), 366 B(SetPendingMessage),
367 B(Star), R(11), 367 B(Star), R(11),
368 B(LdaZero), 368 B(LdaZero),
369 B(TestEqualStrict), R(4), U8(18), 369 B(TestEqualStrict), R(4), U8(18),
370 B(JumpIfTrue), U8(105), 370 B(JumpIfTrue), U8(104),
371 B(LdaNamedProperty), R(2), U8(7), U8(19), 371 B(LdaNamedProperty), R(2), U8(7), U8(19),
372 B(Star), R(6), 372 B(Star), R(6),
373 B(TestUndetectable), R(6), 373 B(TestUndetectable),
374 B(JumpIfFalse), U8(4), 374 B(JumpIfFalse), U8(4),
375 B(Jump), U8(93), 375 B(Jump), U8(93),
376 B(LdaSmi), I8(1), 376 B(LdaSmi), I8(1),
377 B(TestEqualStrict), R(4), U8(22), 377 B(TestEqualStrict), R(4), U8(22),
378 B(JumpIfFalse), U8(61), 378 B(JumpIfFalse), U8(61),
379 B(Ldar), R(6), 379 B(Ldar), R(6),
380 B(TestTypeOf), U8(5), 380 B(TestTypeOf), U8(5),
381 B(JumpIfFalse), U8(4), 381 B(JumpIfFalse), U8(4),
382 B(Jump), U8(18), 382 B(Jump), U8(18),
383 B(Wide), B(LdaSmi), I16(132), 383 B(Wide), B(LdaSmi), I16(132),
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"], 428 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
429 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"], 429 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
430 FIXED_ARRAY_TYPE, 430 FIXED_ARRAY_TYPE,
431 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], 431 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
432 ONE_BYTE_INTERNALIZED_STRING_TYPE [""], 432 ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
433 FIXED_ARRAY_TYPE, 433 FIXED_ARRAY_TYPE,
434 ] 434 ]
435 handlers: [ 435 handlers: [
436 [7, 142, 148], 436 [7, 142, 148],
437 [10, 106, 108], 437 [10, 106, 108],
438 [209, 219, 221], 438 [208, 218, 220],
439 ] 439 ]
440 440
441 --- 441 ---
442 snippet: " 442 snippet: "
443 var x = { 'a': 1, 'b': 2 }; 443 var x = { 'a': 1, 'b': 2 };
444 for (x['a'] of [1,2,3]) { return x['a']; } 444 for (x['a'] of [1,2,3]) { return x['a']; }
445 " 445 "
446 frame size: 14 446 frame size: 14
447 parameter count: 1 447 parameter count: 1
448 bytecode array length: 287 448 bytecode array length: 286
449 bytecodes: [ 449 bytecodes: [
450 /* 30 E> */ B(StackCheck), 450 /* 30 E> */ B(StackCheck),
451 /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(8), 451 /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(8),
452 B(Mov), R(8), R(0), 452 B(Mov), R(8), R(0),
453 B(LdaZero), 453 B(LdaZero),
454 B(Star), R(3), 454 B(Star), R(3),
455 B(Mov), R(context), R(10), 455 B(Mov), R(context), R(10),
456 B(Mov), R(context), R(11), 456 B(Mov), R(context), R(11),
457 /* 77 S> */ B(CreateArrayLiteral), U8(1), U8(3), U8(9), 457 /* 77 S> */ B(CreateArrayLiteral), U8(1), U8(3), U8(9),
458 B(Star), R(12), 458 B(Star), R(12),
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 B(Star), R(8), 504 B(Star), R(8),
505 B(Jump), U8(8), 505 B(Jump), U8(8),
506 B(Star), R(9), 506 B(Star), R(9),
507 B(LdaSmi), I8(1), 507 B(LdaSmi), I8(1),
508 B(Star), R(8), 508 B(Star), R(8),
509 B(LdaTheHole), 509 B(LdaTheHole),
510 B(SetPendingMessage), 510 B(SetPendingMessage),
511 B(Star), R(10), 511 B(Star), R(10),
512 B(LdaZero), 512 B(LdaZero),
513 B(TestEqualStrict), R(3), U8(21), 513 B(TestEqualStrict), R(3), U8(21),
514 B(JumpIfTrue), U8(105), 514 B(JumpIfTrue), U8(104),
515 B(LdaNamedProperty), R(1), U8(9), U8(22), 515 B(LdaNamedProperty), R(1), U8(9), U8(22),
516 B(Star), R(5), 516 B(Star), R(5),
517 B(TestUndetectable), R(5), 517 B(TestUndetectable),
518 B(JumpIfFalse), U8(4), 518 B(JumpIfFalse), U8(4),
519 B(Jump), U8(93), 519 B(Jump), U8(93),
520 B(LdaSmi), I8(1), 520 B(LdaSmi), I8(1),
521 B(TestEqualStrict), R(3), U8(25), 521 B(TestEqualStrict), R(3), U8(25),
522 B(JumpIfFalse), U8(61), 522 B(JumpIfFalse), U8(61),
523 B(Ldar), R(5), 523 B(Ldar), R(5),
524 B(TestTypeOf), U8(5), 524 B(TestTypeOf), U8(5),
525 B(JumpIfFalse), U8(4), 525 B(JumpIfFalse), U8(4),
526 B(Jump), U8(18), 526 B(Jump), U8(18),
527 B(Wide), B(LdaSmi), I16(132), 527 B(Wide), B(LdaSmi), I16(132),
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"], 579 ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
580 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"], 580 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
581 FIXED_ARRAY_TYPE, 581 FIXED_ARRAY_TYPE,
582 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], 582 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
583 ONE_BYTE_INTERNALIZED_STRING_TYPE [""], 583 ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
584 FIXED_ARRAY_TYPE, 584 FIXED_ARRAY_TYPE,
585 ] 585 ]
586 handlers: [ 586 handlers: [
587 [15, 138, 144], 587 [15, 138, 144],
588 [18, 102, 104], 588 [18, 102, 104],
589 [206, 216, 218], 589 [205, 215, 217],
590 ] 590 ]
591 591
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698