Questions tagged [coroutines]
For questions about design and implementation of coroutines, a generalization of subroutines that can be paused and resumed. Indicate in the question whether the coroutines are symmetric or asymmetric, stackful or stackless, and first-class or not.
1 questions from the last 365 days
7
votes
1
answer
418
views
How are coroutines implemented in a tree-walking interpreter?
It seems to me that coroutines and derived abstractions like the iterators and generators are implemented the following way:
When returning
Move the function's stack frame to the heap
Save a pointer ...