I am curious how. I thought quite a lot about targeting MSIL, but i found no way of copying, capturing or slicing the call stack. Nor is it possible to reify even the whole stack as a first class object.
For delimited continuations I only managed to find mostly extremely inefficient ways of doing it. CPS transformations on dotnet are, at least if kept to be useful as delcc, slow as molasses.
Which is ultimately why I chose to compile to c# to use asyncmethodbuilder do do the state machine translation for me.
In many ways I feel I should have targetted OCaml instead, since I would have gotten a full effect handler system and delimited continuations for free.
Now I am generating two bodies for every defun that touches any suspending function, using asyncmethodbuilder, meaning I don't get any of the runtimeasync benefits coming in dotnet11.
Hopefully they'll give us a new asyncmethodbuilder that is somewhat more constrained but guarantees runtime async.
For delimited continuations I only managed to find mostly extremely inefficient ways of doing it. CPS transformations on dotnet are, at least if kept to be useful as delcc, slow as molasses.
Which is ultimately why I chose to compile to c# to use asyncmethodbuilder do do the state machine translation for me.