Commit cdfb411
authored
Fix generator loop closure resumes (#644)
* Fix generator loop closure resumes
* Fix PR review generator callback edge cases
- Preserve active match scopes across yielded for-of bodies.\n- Route var destructuring through the iteration context.\n- Isolate reduce and sort array callbacks from parent generator replay state.
* Preserve for-await generator loop scopes
- Restore saved iteration and match scopes when async generator for-await bodies resume.\n- Skip match-scope release while unwinding body yields.\n- Cover async iterator and sync fallback for-await paths.1 parent c93a49c commit cdfb411
10 files changed
Lines changed: 541 additions & 179 deletions
File tree
- source/units
- tests/language
- for-loop
- for-of
- generators
- pattern-matching
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
| 486 | + | |
486 | 487 | | |
487 | 488 | | |
488 | 489 | | |
| |||
859 | 860 | | |
860 | 861 | | |
861 | 862 | | |
| 863 | + | |
862 | 864 | | |
863 | 865 | | |
864 | 866 | | |
865 | 867 | | |
866 | 868 | | |
867 | | - | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
868 | 875 | | |
869 | | - | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
870 | 892 | | |
871 | 893 | | |
872 | 894 | | |
| |||
919 | 941 | | |
920 | 942 | | |
921 | 943 | | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
922 | 947 | | |
| 948 | + | |
| 949 | + | |
923 | 950 | | |
924 | 951 | | |
925 | 952 | | |
| |||
0 commit comments