Post #2420320
2026-05-09 20:45 UTC
@joe@f.duriansoftware.com Yeah, I saw that, as well as their first work in this direction (Thorin) and some of the intermediate steps. That seems reasonable for representing nested functions and the result of the generator CPS transform, but I was originally thinking about something that also lets you represent the untransformed code. That’s probably a waste of time if your only viable compilation model is to transform the CPS-transform the yield-handling loop.
Replies (2)
-
@joe@f.duriansoftware.com 2026-05-09 21:06
@zwarich@hachyderm.io you could probably extend the idea to allow for “peer” CFGs that can inter-reference each other, in addition to the strict nesting of contexts they do
-
@zwarich@hachyderm.io 2026-05-09 23:14
@joe@f.duriansoftware.com If you want to maintain typing while doing "closure" conversion, then unless I'm missing something you need to add existentials to your IR.