I recently came across this paper: https://www.microsoft.com/en-us/research/publication/implementing-algebraic-effects-c/
The gist is that they use setjmp/longjmp to create delimited continuations in compliant C99. It seems like this method is fairly close to what PyPy already does with stacklets. Any reason why this couldn't be ported to PyPy? Of course there'd have to be some sort of stack integration as with stacklets, but it seems that that mostly boils down to making sure the GC has a way to trace the bits of the stack contained in the continuations. I'm considering trying my hand at using their library via rffi, and copying what I need from _stacklet_shadowstack.py. But perhaps there's something I'm missing that makes this a no-go from the start. Thanks, Timothy Baldridge
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev