3 ms·
Languages that compile to continuations often put the continuations on the heap. So think Standard ML and Scheme implementations, not all of them of course. SML
by eatonphil 5y ago
Languages that compile to continuations often put the continuations on the heap. So think Standard ML and Scheme implementations, not all of them of course. SML/NJ is a specific example.
https://par.nsf.gov/servlets/purl/10201136 https://par.nsf.gov/servlets/purl/10201136
- eru 5y agoThat's one group of examples. Another group is languages that are not strict. Haskell is perhaps the most prominent one. Programs compiled with GHC do use 'the stack', but for pattern matching, not for function calls. Whether 'stack frames' (ie the information associated with a function invocation) go on the heap or elsewhere is a bit complicated. Especially since the compiler does so much analysis and optimization. Also eg, an implementation of Unlambda (based on SKI-calculus) wouldn't necessarily have a stack either.