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

Side by Side Diff: test/cctest/interpreter/bytecode_expectations/ForAwaitOf.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: no 6 wrap: no
7 test function name: f 7 test function name: f
8 async iteration: yes 8 async iteration: yes
9 9
10 --- 10 ---
11 snippet: " 11 snippet: "
12 async function f() { 12 async function f() {
13 for await (let x of [1, 2, 3]) {} 13 for await (let x of [1, 2, 3]) {}
14 } 14 }
15 f(); 15 f();
16 " 16 "
17 frame size: 19 17 frame size: 19
18 parameter count: 1 18 parameter count: 1
19 bytecode array length: 1030 19 bytecode array length: 1027
20 bytecodes: [ 20 bytecodes: [
21 B(Ldar), R(new_target), 21 B(Ldar), R(new_target),
22 B(JumpIfUndefined), U8(39), 22 B(JumpIfUndefined), U8(39),
23 B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_targe t), U8(1), 23 B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_targe t), U8(1),
24 B(PushContext), R(4), 24 B(PushContext), R(4),
25 B(ResumeGenerator), R(new_target), 25 B(ResumeGenerator), R(new_target),
26 B(Star), R(3), 26 B(Star), R(3),
27 B(LdaZero), 27 B(LdaZero),
28 B(TestEqualStrictNoFeedback), R(3), 28 B(TestEqualStrictNoFeedback), R(3),
29 B(JumpIfTrue), U8(132), 29 B(JumpIfTrue), U8(132),
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 B(LdaContextSlot), R(1), U8(9), U8(0), 197 B(LdaContextSlot), R(1), U8(9), U8(0),
198 B(Star), R(12), 198 B(Star), R(12),
199 B(LdaZero), 199 B(LdaZero),
200 B(TestEqualStrict), R(12), U8(20), 200 B(TestEqualStrict), R(12), U8(20),
201 B(JumpIfTrueConstant), U8(16), 201 B(JumpIfTrueConstant), U8(16),
202 B(LdaContextSlot), R(1), U8(7), U8(0), 202 B(LdaContextSlot), R(1), U8(7), U8(0),
203 B(Star), R(12), 203 B(Star), R(12),
204 B(LdaNamedProperty), R(12), U8(10), U8(21), 204 B(LdaNamedProperty), R(12), U8(10), U8(21),
205 B(StaContextSlot), R(1), U8(13), U8(0), 205 B(StaContextSlot), R(1), U8(13), U8(0),
206 B(LdaContextSlot), R(1), U8(13), U8(0), 206 B(LdaContextSlot), R(1), U8(13), U8(0),
207 B(Star), R(12), 207 B(TestUndetectable),
208 B(TestUndetectable), R(12),
209 B(JumpIfFalse), U8(4), 208 B(JumpIfFalse), U8(4),
210 B(JumpConstant), U8(15), 209 B(JumpConstant), U8(15),
211 B(LdaContextSlot), R(1), U8(9), U8(0), 210 B(LdaContextSlot), R(1), U8(9), U8(0),
212 B(Star), R(12), 211 B(Star), R(12),
213 B(LdaSmi), I8(1), 212 B(LdaSmi), I8(1),
214 B(TestEqualStrict), R(12), U8(24), 213 B(TestEqualStrict), R(12), U8(24),
215 B(JumpIfFalse), U8(179), 214 B(JumpIfFalse), U8(179),
216 B(LdaContextSlot), R(1), U8(13), U8(0), 215 B(LdaContextSlot), R(1), U8(13), U8(0),
217 B(TestTypeOf), U8(5), 216 B(TestTypeOf), U8(5),
218 B(JumpIfFalse), U8(4), 217 B(JumpIfFalse), U8(4),
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 SYMBOL_TYPE, 460 SYMBOL_TYPE,
462 SYMBOL_TYPE, 461 SYMBOL_TYPE,
463 ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"], 462 ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
464 ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"], 463 ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
465 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"], 464 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
466 FIXED_ARRAY_TYPE, 465 FIXED_ARRAY_TYPE,
467 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"], 466 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
468 FIXED_ARRAY_TYPE, 467 FIXED_ARRAY_TYPE,
469 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], 468 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
470 ONE_BYTE_INTERNALIZED_STRING_TYPE [""], 469 ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
471 Smi [560], 470 Smi [557],
472 FIXED_ARRAY_TYPE, 471 FIXED_ARRAY_TYPE,
473 Smi [702], 472 Smi [699],
474 Smi [348], 473 Smi [348],
475 Smi [374], 474 Smi [371],
476 FIXED_ARRAY_TYPE, 475 FIXED_ARRAY_TYPE,
477 Smi [317], 476 Smi [317],
478 ] 477 ]
479 handlers: [ 478 handlers: [
480 [80, 943, 949], 479 [80, 940, 946],
481 [83, 889, 891], 480 [83, 886, 888],
482 [100, 423, 429], 481 [100, 423, 429],
483 [103, 375, 377], 482 [103, 375, 377],
484 [519, 645, 647], 483 [516, 642, 644],
485 ] 484 ]
486 485
487 --- 486 ---
488 snippet: " 487 snippet: "
489 async function f() { 488 async function f() {
490 for await (let x of [1, 2, 3]) { return x; } 489 for await (let x of [1, 2, 3]) { return x; }
491 } 490 }
492 f(); 491 f();
493 " 492 "
494 frame size: 19 493 frame size: 19
495 parameter count: 1 494 parameter count: 1
496 bytecode array length: 1088 495 bytecode array length: 1085
497 bytecodes: [ 496 bytecodes: [
498 B(Ldar), R(new_target), 497 B(Ldar), R(new_target),
499 B(JumpIfUndefined), U8(39), 498 B(JumpIfUndefined), U8(39),
500 B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_targe t), U8(1), 499 B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_targe t), U8(1),
501 B(PushContext), R(4), 500 B(PushContext), R(4),
502 B(ResumeGenerator), R(new_target), 501 B(ResumeGenerator), R(new_target),
503 B(Star), R(3), 502 B(Star), R(3),
504 B(LdaZero), 503 B(LdaZero),
505 B(TestEqualStrictNoFeedback), R(3), 504 B(TestEqualStrictNoFeedback), R(3),
506 B(JumpIfTrue), U8(132), 505 B(JumpIfTrue), U8(132),
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 B(LdaContextSlot), R(1), U8(9), U8(0), 680 B(LdaContextSlot), R(1), U8(9), U8(0),
682 B(Star), R(12), 681 B(Star), R(12),
683 B(LdaZero), 682 B(LdaZero),
684 B(TestEqualStrict), R(12), U8(20), 683 B(TestEqualStrict), R(12), U8(20),
685 B(JumpIfTrueConstant), U8(16), 684 B(JumpIfTrueConstant), U8(16),
686 B(LdaContextSlot), R(1), U8(7), U8(0), 685 B(LdaContextSlot), R(1), U8(7), U8(0),
687 B(Star), R(12), 686 B(Star), R(12),
688 B(LdaNamedProperty), R(12), U8(10), U8(21), 687 B(LdaNamedProperty), R(12), U8(10), U8(21),
689 B(StaContextSlot), R(1), U8(13), U8(0), 688 B(StaContextSlot), R(1), U8(13), U8(0),
690 B(LdaContextSlot), R(1), U8(13), U8(0), 689 B(LdaContextSlot), R(1), U8(13), U8(0),
691 B(Star), R(12), 690 B(TestUndetectable),
692 B(TestUndetectable), R(12),
693 B(JumpIfFalse), U8(4), 691 B(JumpIfFalse), U8(4),
694 B(JumpConstant), U8(15), 692 B(JumpConstant), U8(15),
695 B(LdaContextSlot), R(1), U8(9), U8(0), 693 B(LdaContextSlot), R(1), U8(9), U8(0),
696 B(Star), R(12), 694 B(Star), R(12),
697 B(LdaSmi), I8(1), 695 B(LdaSmi), I8(1),
698 B(TestEqualStrict), R(12), U8(24), 696 B(TestEqualStrict), R(12), U8(24),
699 B(JumpIfFalse), U8(179), 697 B(JumpIfFalse), U8(179),
700 B(LdaContextSlot), R(1), U8(13), U8(0), 698 B(LdaContextSlot), R(1), U8(13), U8(0),
701 B(TestTypeOf), U8(5), 699 B(TestTypeOf), U8(5),
702 B(JumpIfFalse), U8(4), 700 B(JumpIfFalse), U8(4),
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
967 SYMBOL_TYPE, 965 SYMBOL_TYPE,
968 SYMBOL_TYPE, 966 SYMBOL_TYPE,
969 ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"], 967 ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
970 ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"], 968 ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
971 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"], 969 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
972 FIXED_ARRAY_TYPE, 970 FIXED_ARRAY_TYPE,
973 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"], 971 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
974 FIXED_ARRAY_TYPE, 972 FIXED_ARRAY_TYPE,
975 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], 973 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
976 ONE_BYTE_INTERNALIZED_STRING_TYPE [""], 974 ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
977 Smi [572], 975 Smi [569],
978 FIXED_ARRAY_TYPE, 976 FIXED_ARRAY_TYPE,
979 Smi [714], 977 Smi [711],
980 Smi [348], 978 Smi [348],
981 Smi [374], 979 Smi [371],
982 FIXED_ARRAY_TYPE, 980 FIXED_ARRAY_TYPE,
983 Smi [340], 981 Smi [340],
984 ] 982 ]
985 handlers: [ 983 handlers: [
986 [80, 978, 984], 984 [80, 975, 981],
987 [83, 924, 926], 985 [83, 921, 923],
988 [100, 435, 441], 986 [100, 435, 441],
989 [103, 387, 389], 987 [103, 387, 389],
990 [531, 657, 659], 988 [528, 654, 656],
991 ] 989 ]
992 990
993 --- 991 ---
994 snippet: " 992 snippet: "
995 async function f() { 993 async function f() {
996 for await (let x of [10, 20, 30]) { 994 for await (let x of [10, 20, 30]) {
997 if (x == 10) continue; 995 if (x == 10) continue;
998 if (x == 20) break; 996 if (x == 20) break;
999 } 997 }
1000 } 998 }
1001 f(); 999 f();
1002 " 1000 "
1003 frame size: 19 1001 frame size: 19
1004 parameter count: 1 1002 parameter count: 1
1005 bytecode array length: 1067 1003 bytecode array length: 1064
1006 bytecodes: [ 1004 bytecodes: [
1007 B(Ldar), R(new_target), 1005 B(Ldar), R(new_target),
1008 B(JumpIfUndefined), U8(39), 1006 B(JumpIfUndefined), U8(39),
1009 B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_targe t), U8(1), 1007 B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_targe t), U8(1),
1010 B(PushContext), R(4), 1008 B(PushContext), R(4),
1011 B(ResumeGenerator), R(new_target), 1009 B(ResumeGenerator), R(new_target),
1012 B(Star), R(3), 1010 B(Star), R(3),
1013 B(LdaZero), 1011 B(LdaZero),
1014 B(TestEqualStrictNoFeedback), R(3), 1012 B(TestEqualStrictNoFeedback), R(3),
1015 B(JumpIfTrue), U8(132), 1013 B(JumpIfTrue), U8(132),
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 B(LdaContextSlot), R(1), U8(9), U8(0), 1197 B(LdaContextSlot), R(1), U8(9), U8(0),
1200 B(Star), R(12), 1198 B(Star), R(12),
1201 B(LdaZero), 1199 B(LdaZero),
1202 B(TestEqualStrict), R(12), U8(22), 1200 B(TestEqualStrict), R(12), U8(22),
1203 B(JumpIfTrueConstant), U8(16), 1201 B(JumpIfTrueConstant), U8(16),
1204 B(LdaContextSlot), R(1), U8(7), U8(0), 1202 B(LdaContextSlot), R(1), U8(7), U8(0),
1205 B(Star), R(12), 1203 B(Star), R(12),
1206 B(LdaNamedProperty), R(12), U8(10), U8(23), 1204 B(LdaNamedProperty), R(12), U8(10), U8(23),
1207 B(StaContextSlot), R(1), U8(13), U8(0), 1205 B(StaContextSlot), R(1), U8(13), U8(0),
1208 B(LdaContextSlot), R(1), U8(13), U8(0), 1206 B(LdaContextSlot), R(1), U8(13), U8(0),
1209 B(Star), R(12), 1207 B(TestUndetectable),
1210 B(TestUndetectable), R(12),
1211 B(JumpIfFalse), U8(4), 1208 B(JumpIfFalse), U8(4),
1212 B(JumpConstant), U8(15), 1209 B(JumpConstant), U8(15),
1213 B(LdaContextSlot), R(1), U8(9), U8(0), 1210 B(LdaContextSlot), R(1), U8(9), U8(0),
1214 B(Star), R(12), 1211 B(Star), R(12),
1215 B(LdaSmi), I8(1), 1212 B(LdaSmi), I8(1),
1216 B(TestEqualStrict), R(12), U8(26), 1213 B(TestEqualStrict), R(12), U8(26),
1217 B(JumpIfFalse), U8(179), 1214 B(JumpIfFalse), U8(179),
1218 B(LdaContextSlot), R(1), U8(13), U8(0), 1215 B(LdaContextSlot), R(1), U8(13), U8(0),
1219 B(TestTypeOf), U8(5), 1216 B(TestTypeOf), U8(5),
1220 B(JumpIfFalse), U8(4), 1217 B(JumpIfFalse), U8(4),
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 SYMBOL_TYPE, 1460 SYMBOL_TYPE,
1464 SYMBOL_TYPE, 1461 SYMBOL_TYPE,
1465 ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"], 1462 ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
1466 ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"], 1463 ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
1467 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"], 1464 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
1468 FIXED_ARRAY_TYPE, 1465 FIXED_ARRAY_TYPE,
1469 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"], 1466 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
1470 FIXED_ARRAY_TYPE, 1467 FIXED_ARRAY_TYPE,
1471 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], 1468 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
1472 ONE_BYTE_INTERNALIZED_STRING_TYPE [""], 1469 ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
1473 Smi [597], 1470 Smi [594],
1474 FIXED_ARRAY_TYPE, 1471 FIXED_ARRAY_TYPE,
1475 Smi [739], 1472 Smi [736],
1476 Smi [348], 1473 Smi [348],
1477 Smi [374], 1474 Smi [371],
1478 FIXED_ARRAY_TYPE, 1475 FIXED_ARRAY_TYPE,
1479 Smi [317], 1476 Smi [317],
1480 ] 1477 ]
1481 handlers: [ 1478 handlers: [
1482 [80, 980, 986], 1479 [80, 977, 983],
1483 [83, 926, 928], 1480 [83, 923, 925],
1484 [100, 460, 466], 1481 [100, 460, 466],
1485 [103, 412, 414], 1482 [103, 412, 414],
1486 [556, 682, 684], 1483 [553, 679, 681],
1487 ] 1484 ]
1488 1485
1489 --- 1486 ---
1490 snippet: " 1487 snippet: "
1491 async function f() { 1488 async function f() {
1492 var x = { 'a': 1, 'b': 2 }; 1489 var x = { 'a': 1, 'b': 2 };
1493 for (x['a'] of [1,2,3]) { return x['a']; } 1490 for (x['a'] of [1,2,3]) { return x['a']; }
1494 } 1491 }
1495 f(); 1492 f();
1496 " 1493 "
1497 frame size: 14 1494 frame size: 14
1498 parameter count: 1 1495 parameter count: 1
1499 bytecode array length: 582 1496 bytecode array length: 579
1500 bytecodes: [ 1497 bytecodes: [
1501 B(Ldar), R(new_target), 1498 B(Ldar), R(new_target),
1502 B(JumpIfUndefined), U8(22), 1499 B(JumpIfUndefined), U8(22),
1503 B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_targe t), U8(1), 1500 B(CallRuntime), U16(Runtime::k_GeneratorGetContext), R(new_targe t), U8(1),
1504 B(PushContext), R(3), 1501 B(PushContext), R(3),
1505 B(ResumeGenerator), R(new_target), 1502 B(ResumeGenerator), R(new_target),
1506 B(Star), R(2), 1503 B(Star), R(2),
1507 B(LdaSmi), I8(78), 1504 B(LdaSmi), I8(78),
1508 B(Star), R(4), 1505 B(Star), R(4),
1509 B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1), 1506 B(CallRuntime), U16(Runtime::kAbort), R(4), U8(1),
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 B(Star), R(9), 1598 B(Star), R(9),
1602 B(LdaSmi), I8(1), 1599 B(LdaSmi), I8(1),
1603 B(Star), R(8), 1600 B(Star), R(8),
1604 B(LdaTheHole), 1601 B(LdaTheHole),
1605 B(SetPendingMessage), 1602 B(SetPendingMessage),
1606 B(Star), R(10), 1603 B(Star), R(10),
1607 B(LdaCurrentContextSlot), U8(9), 1604 B(LdaCurrentContextSlot), U8(9),
1608 B(Star), R(11), 1605 B(Star), R(11),
1609 B(LdaZero), 1606 B(LdaZero),
1610 B(TestEqualStrict), R(11), U8(21), 1607 B(TestEqualStrict), R(11), U8(21),
1611 B(JumpIfTrue), U8(129), 1608 B(JumpIfTrue), U8(126),
1612 B(LdaCurrentContextSlot), U8(7), 1609 B(LdaCurrentContextSlot), U8(7),
1613 B(Star), R(11), 1610 B(Star), R(11),
1614 B(LdaNamedProperty), R(11), U8(9), U8(22), 1611 B(LdaNamedProperty), R(11), U8(9), U8(22),
1615 B(StaCurrentContextSlot), U8(11), 1612 B(StaCurrentContextSlot), U8(11),
1616 B(LdaCurrentContextSlot), U8(11), 1613 B(LdaCurrentContextSlot), U8(11),
1617 B(Star), R(11), 1614 B(TestUndetectable),
1618 B(TestUndetectable), R(11),
1619 B(JumpIfFalse), U8(4), 1615 B(JumpIfFalse), U8(4),
1620 B(Jump), U8(109), 1616 B(Jump), U8(109),
1621 B(LdaCurrentContextSlot), U8(9), 1617 B(LdaCurrentContextSlot), U8(9),
1622 B(Star), R(11), 1618 B(Star), R(11),
1623 B(LdaSmi), I8(1), 1619 B(LdaSmi), I8(1),
1624 B(TestEqualStrict), R(11), U8(25), 1620 B(TestEqualStrict), R(11), U8(25),
1625 B(JumpIfFalse), U8(63), 1621 B(JumpIfFalse), U8(63),
1626 B(LdaCurrentContextSlot), U8(11), 1622 B(LdaCurrentContextSlot), U8(11),
1627 B(TestTypeOf), U8(5), 1623 B(TestTypeOf), U8(5),
1628 B(JumpIfFalse), U8(4), 1624 B(JumpIfFalse), U8(4),
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"], 1767 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
1772 ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"], 1768 ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
1773 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"], 1769 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
1774 FIXED_ARRAY_TYPE, 1770 FIXED_ARRAY_TYPE,
1775 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], 1771 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
1776 ONE_BYTE_INTERNALIZED_STRING_TYPE [""], 1772 ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
1777 FIXED_ARRAY_TYPE, 1773 FIXED_ARRAY_TYPE,
1778 FIXED_ARRAY_TYPE, 1774 FIXED_ARRAY_TYPE,
1779 ] 1775 ]
1780 handlers: [ 1776 handlers: [
1781 [63, 499, 505], 1777 [63, 496, 502],
1782 [66, 445, 447], 1778 [66, 442, 444],
1783 [81, 241, 247], 1779 [81, 241, 247],
1784 [84, 193, 195], 1780 [84, 193, 195],
1785 [325, 337, 339], 1781 [322, 334, 336],
1786 ] 1782 ]
1787 1783
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698