File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
unison-runtime/src/Unison/Runtime/ANF Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -747,6 +747,19 @@ linearTail opts self vs bound rec ar kf0 tm
747
747
-- body. This does not obey the normal inlining classification, so it
748
748
-- may inline a function that makes indirect calls, and needs to
749
749
-- account for that. This allows us to see more linear situations.
750
+ --
751
+ -- Note: this does _not_ fix the `Direction` numbering in the result.
752
+ -- The numbering is intended to allow returning to specific points
753
+ -- within a function; each number mapping to a code section that is
754
+ -- the rest of the function from that point.
755
+ --
756
+ -- However, this is not used during normal code execution. `Let` in
757
+ -- code directly stores its body. The numbering is used to reconstruct
758
+ -- continuations from the interchange format, since they only send the
759
+ -- numbers. However, _affine_ handlers are only use in contexts where
760
+ -- continuations aren't captured, so we don't actually need a correct
761
+ -- numbering. If this is ever changed, then the numbering here must be
762
+ -- adjusted.
750
763
replaceLinearBody :: (Var v ) => OptInfos v -> ANormal v -> ANormal v
751
764
replaceLinearBody (arities, inls) bd
752
765
| TCom r vs <- bd,
You can’t perform that action at this time.
0 commit comments