Commit 9922072
authored
eraiser:
A raising routine's `result = v` was rebuilt as `result = (Success, v)`.
That nests `v` one level deep, and `cps` only ends a coroutine state
where a suspension point is the ROOT of an assignment's value: a
`.passive` call there was invisible, so `result = passiveCall()` in a
raising coroutine returned 0, or failed with `cps.nim: state != -1` in
tail position.
The rebuild was redundant anyway: `result[0] = Success` is set at the
declaration and every path that changes it leaves the routine, and a
retyped local's check has already passed. So the assignment is simply
`result[1] = v`, which the generic path already produces. `trAsgn` is
gone.result = v projects onto the value half (#2568)1 parent 492c9b6 commit 9922072
3 files changed
Lines changed: 69 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
727 | 732 | | |
728 | 733 | | |
729 | 734 | | |
730 | | - | |
731 | | - | |
732 | | - | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | 735 | | |
749 | 736 | | |
750 | 737 | | |
| |||
848 | 835 | | |
849 | 836 | | |
850 | 837 | | |
851 | | - | |
852 | | - | |
853 | 838 | | |
854 | 839 | | |
855 | 840 | | |
| |||
864 | 849 | | |
865 | 850 | | |
866 | 851 | | |
867 | | - | |
| 852 | + | |
868 | 853 | | |
869 | 854 | | |
870 | 855 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments