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

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

Issue 2936813002: Move closing of generators upon final return to the generator-resume builtin. (Closed)
Patch Set: Add TODO Created 3 years, 6 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 8
9 --- 9 ---
10 snippet: " 10 snippet: "
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 636
637 --- 637 ---
638 snippet: " 638 snippet: "
639 function* f(arr) { 639 function* f(arr) {
640 for (let x of arr) { let y = x; } 640 for (let x of arr) { let y = x; }
641 } 641 }
642 f([1, 2, 3]); 642 f([1, 2, 3]);
643 " 643 "
644 frame size: 20 644 frame size: 20
645 parameter count: 2 645 parameter count: 2
646 bytecode array length: 370 646 bytecode array length: 358
647 bytecodes: [ 647 bytecodes: [
648 B(Mov), R(new_target), R(11), 648 B(Mov), R(new_target), R(11),
649 B(Ldar), R(new_target), 649 B(Ldar), R(new_target),
650 B(JumpIfUndefined), U8(25), 650 B(JumpIfUndefined), U8(25),
651 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(11), U 8(1), 651 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(11), U 8(1),
652 B(PushContext), R(13), 652 B(PushContext), R(13),
653 B(RestoreGeneratorState), R(11), 653 B(RestoreGeneratorState), R(11),
654 B(Star), R(12), 654 B(Star), R(12),
655 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0), 655 B(SwitchOnSmiNoFeedback), U8(0), U8(1), I8(0),
656 B(LdaSmi), I8(79), 656 B(LdaSmi), I8(79),
(...skipping 18 matching lines...) Expand all
675 /* 55 S> */ B(Return), 675 /* 55 S> */ B(Return),
676 B(RestoreGeneratorRegisters), R(11), R(0), U8(14), 676 B(RestoreGeneratorRegisters), R(11), R(0), U8(14),
677 B(LdaSmi), I8(-2), 677 B(LdaSmi), I8(-2),
678 B(Star), R(12), 678 B(Star), R(12),
679 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(11), U8(1), 679 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(11), U8(1),
680 B(Star), R(14), 680 B(Star), R(14),
681 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(11) , U8(1), 681 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(11) , U8(1),
682 B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0), 682 B(SwitchOnSmiNoFeedback), U8(1), U8(2), I8(0),
683 B(Ldar), R(14), 683 B(Ldar), R(14),
684 /* 11 E> */ B(Throw), 684 /* 11 E> */ B(Throw),
685 B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(11), U8(1),
686 B(Ldar), R(14), 685 B(Ldar), R(14),
687 /* 55 S> */ B(Return), 686 /* 55 S> */ B(Return),
688 B(LdaZero), 687 B(LdaZero),
689 B(Star), R(7), 688 B(Star), R(7),
690 B(Mov), R(context), R(16), 689 B(Mov), R(context), R(16),
691 B(Mov), R(context), R(17), 690 B(Mov), R(context), R(17),
692 /* 35 S> */ B(LdaImmutableCurrentContextSlot), U8(4), 691 /* 35 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
693 B(Star), R(18), 692 B(Star), R(18),
694 B(LdaNamedProperty), R(18), U8(3), U8(3), 693 B(LdaNamedProperty), R(18), U8(3), U8(3),
695 B(Star), R(19), 694 B(Star), R(19),
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 B(Jump), U8(7), 786 B(Jump), U8(7),
788 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R (10), U8(1), 787 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R (10), U8(1),
789 B(Ldar), R(16), 788 B(Ldar), R(16),
790 B(SetPendingMessage), 789 B(SetPendingMessage),
791 B(LdaZero), 790 B(LdaZero),
792 B(TestEqualStrictNoFeedback), R(14), 791 B(TestEqualStrictNoFeedback), R(14),
793 B(JumpIfFalse), U8(5), 792 B(JumpIfFalse), U8(5),
794 B(Ldar), R(15), 793 B(Ldar), R(15),
795 B(ReThrow), 794 B(ReThrow),
796 B(LdaUndefined), 795 B(LdaUndefined),
797 B(Star), R(14),
798 B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(11), U8(1),
799 B(Ldar), R(14),
800 /* 55 S> */ B(Return), 796 /* 55 S> */ B(Return),
801 ] 797 ]
802 constant pool: [ 798 constant pool: [
803 Smi [53], 799 Smi [53],
804 Smi [14], 800 Smi [10],
805 Smi [7], 801 Smi [7],
806 SYMBOL_TYPE, 802 SYMBOL_TYPE,
807 ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"], 803 ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
808 ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"], 804 ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
809 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"], 805 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
810 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"], 806 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
811 FIXED_ARRAY_TYPE, 807 FIXED_ARRAY_TYPE,
812 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], 808 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
813 ONE_BYTE_INTERNALIZED_STRING_TYPE [""], 809 ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
814 FIXED_ARRAY_TYPE, 810 FIXED_ARRAY_TYPE,
815 ] 811 ]
816 handlers: [ 812 handlers: [
817 [108, 226, 232], 813 [104, 222, 228],
818 [111, 190, 192], 814 [107, 186, 188],
819 [292, 302, 304], 815 [288, 298, 300],
820 ] 816 ]
821 817
822 --- 818 ---
823 snippet: " 819 snippet: "
824 function* f(arr) { 820 function* f(arr) {
825 for (let x of arr) yield x; 821 for (let x of arr) yield x;
826 } 822 }
827 f([1, 2, 3]); 823 f([1, 2, 3]);
828 " 824 "
829 frame size: 20 825 frame size: 20
830 parameter count: 2 826 parameter count: 2
831 bytecode array length: 453 827 bytecode array length: 437
832 bytecodes: [ 828 bytecodes: [
833 B(Mov), R(new_target), R(10), 829 B(Mov), R(new_target), R(10),
834 B(Ldar), R(new_target), 830 B(Ldar), R(new_target),
835 B(JumpIfUndefined), U8(25), 831 B(JumpIfUndefined), U8(25),
836 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(10), U 8(1), 832 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetContext), R(10), U 8(1),
837 B(PushContext), R(12), 833 B(PushContext), R(12),
838 B(RestoreGeneratorState), R(10), 834 B(RestoreGeneratorState), R(10),
839 B(Star), R(11), 835 B(Star), R(11),
840 B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0), 836 B(SwitchOnSmiNoFeedback), U8(0), U8(2), I8(0),
841 B(LdaSmi), I8(79), 837 B(LdaSmi), I8(79),
(...skipping 18 matching lines...) Expand all
860 /* 49 S> */ B(Return), 856 /* 49 S> */ B(Return),
861 B(RestoreGeneratorRegisters), R(10), R(0), U8(13), 857 B(RestoreGeneratorRegisters), R(10), R(0), U8(13),
862 B(LdaSmi), I8(-2), 858 B(LdaSmi), I8(-2),
863 B(Star), R(11), 859 B(Star), R(11),
864 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(10), U8(1), 860 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetInputOrDebugPos), R(10), U8(1),
865 B(Star), R(13), 861 B(Star), R(13),
866 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(10) , U8(1), 862 B(InvokeIntrinsic), U8(Runtime::k_GeneratorGetResumeMode), R(10) , U8(1),
867 B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0), 863 B(SwitchOnSmiNoFeedback), U8(2), U8(2), I8(0),
868 B(Ldar), R(13), 864 B(Ldar), R(13),
869 /* 11 E> */ B(Throw), 865 /* 11 E> */ B(Throw),
870 B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
871 B(Ldar), R(13), 866 B(Ldar), R(13),
872 /* 49 S> */ B(Return), 867 /* 49 S> */ B(Return),
873 B(LdaZero), 868 B(LdaZero),
874 B(Star), R(6), 869 B(Star), R(6),
875 B(Mov), R(context), R(15), 870 B(Mov), R(context), R(15),
876 B(Mov), R(context), R(16), 871 B(Mov), R(context), R(16),
877 /* 35 S> */ B(LdaImmutableCurrentContextSlot), U8(4), 872 /* 35 S> */ B(LdaImmutableCurrentContextSlot), U8(4),
878 B(Star), R(17), 873 B(Star), R(17),
879 B(LdaNamedProperty), R(17), U8(4), U8(3), 874 B(LdaNamedProperty), R(17), U8(4), U8(3),
880 B(Star), R(18), 875 B(Star), R(18),
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2), 991 B(InvokeIntrinsic), U8(Runtime::k_Call), R(16), U8(2),
997 B(Star), R(9), 992 B(Star), R(9),
998 B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1), 993 B(InvokeIntrinsic), U8(Runtime::k_IsJSReceiver), R(9), U8(1),
999 B(JumpIfToBooleanFalse), U8(4), 994 B(JumpIfToBooleanFalse), U8(4),
1000 B(Jump), U8(7), 995 B(Jump), U8(7),
1001 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R (9), U8(1), 996 B(CallRuntime), U16(Runtime::kThrowIteratorResultNotAnObject), R (9), U8(1),
1002 B(Ldar), R(15), 997 B(Ldar), R(15),
1003 B(SetPendingMessage), 998 B(SetPendingMessage),
1004 B(Ldar), R(13), 999 B(Ldar), R(13),
1005 B(SwitchOnSmiNoFeedback), U8(16), U8(2), I8(0), 1000 B(SwitchOnSmiNoFeedback), U8(16), U8(2), I8(0),
1006 B(Jump), U8(12), 1001 B(Jump), U8(8),
1007 B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
1008 B(Ldar), R(14), 1002 B(Ldar), R(14),
1009 /* 49 S> */ B(Return), 1003 /* 49 S> */ B(Return),
1010 B(Ldar), R(14), 1004 B(Ldar), R(14),
1011 B(ReThrow), 1005 B(ReThrow),
1012 B(LdaUndefined), 1006 B(LdaUndefined),
1013 B(Star), R(13),
1014 B(InvokeIntrinsic), U8(Runtime::k_GeneratorClose), R(10), U8(1),
1015 B(Ldar), R(13),
1016 /* 49 S> */ B(Return), 1007 /* 49 S> */ B(Return),
1017 ] 1008 ]
1018 constant pool: [ 1009 constant pool: [
1019 Smi [53], 1010 Smi [53],
1020 Smi [117], 1011 Smi [113],
1021 Smi [14], 1012 Smi [10],
1022 Smi [7], 1013 Smi [7],
1023 SYMBOL_TYPE, 1014 SYMBOL_TYPE,
1024 Smi [87], 1015 Smi [87],
1025 ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"], 1016 ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],
1026 ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"], 1017 ONE_BYTE_INTERNALIZED_STRING_TYPE ["done"],
1027 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"], 1018 ONE_BYTE_INTERNALIZED_STRING_TYPE ["value"],
1028 Smi [15], 1019 Smi [15],
1029 Smi [7], 1020 Smi [7],
1030 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"], 1021 ONE_BYTE_INTERNALIZED_STRING_TYPE [".catch"],
1031 FIXED_ARRAY_TYPE, 1022 FIXED_ARRAY_TYPE,
1032 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"], 1023 ONE_BYTE_INTERNALIZED_STRING_TYPE ["return"],
1033 ONE_BYTE_INTERNALIZED_STRING_TYPE [""], 1024 ONE_BYTE_INTERNALIZED_STRING_TYPE [""],
1034 FIXED_ARRAY_TYPE, 1025 FIXED_ARRAY_TYPE,
1035 Smi [6], 1026 Smi [6],
1036 Smi [13], 1027 Smi [9],
1037 ] 1028 ]
1038 handlers: [ 1029 handlers: [
1039 [108, 298, 304], 1030 [104, 294, 300],
1040 [111, 262, 264], 1031 [107, 258, 260],
1041 [365, 375, 377], 1032 [361, 371, 373],
1042 ] 1033 ]
1043 1034
1044 --- 1035 ---
1045 snippet: " 1036 snippet: "
1046 async function f(arr) { 1037 async function f(arr) {
1047 for (let x of arr) { let y = x; } 1038 for (let x of arr) { let y = x; }
1048 } 1039 }
1049 f([1, 2, 3]); 1040 f([1, 2, 3]);
1050 " 1041 "
1051 frame size: 23 1042 frame size: 23
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1517 Smi [9], 1508 Smi [9],
1518 ] 1509 ]
1519 handlers: [ 1510 handlers: [
1520 [70, 492, 498], 1511 [70, 492, 498],
1521 [73, 447, 449], 1512 [73, 447, 449],
1522 [79, 280, 286], 1513 [79, 280, 286],
1523 [82, 240, 242], 1514 [82, 240, 242],
1524 [347, 357, 359], 1515 [347, 357, 359],
1525 ] 1516 ]
1526 1517
OLDNEW
« no previous file with comments | « src/parsing/rewriter.cc ('k') | test/cctest/interpreter/bytecode_expectations/Generators.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698