4 ms·
> > > So the stack frames aren't allocated on the heap. > > So where exactly are the closures allocated ? > They would be allocated on the heap You're playin
by beagle3 15y ago
> > > So the stack frames aren't allocated on the heap.
> > So where exactly are the closures allocated ?
> They would be allocated on the heap
You're playing a weird game of semantics here. closures and stack frames are the same thing in this case. The fact that the "call stack" is implemented via a register called "the stack register" and uses a LIFO move-the-mark allocation scheme is an irrelevant implementation detail.
Your assertion that CPS conversion is somehow more efficient than growable stacks is not supported by any of the arguments you presented.
- DanWaterworth 15y agoClosures and stack frames are definitely not the same thing. CPS conversion is used to create continuations; it's not necessary that the continuations are compiled naively using CPS.