4 ms·
By heap allocating stack frames I mean that each time you call a function, SML/NJ allocates space for that individual frame on the heap. It then uses the garbag
by pcwalton 8y ago
By heap allocating stack frames I mean that each time you call a function, SML/NJ allocates space for that individual frame on the heap. It then uses the garbage collector to clean up frames after the function call has returned.
- twic 8y agoSmalltalk-80 did this too. Later implementations try to avoid it, but sometimes still do: http://www.wirfs-brock.com/allen/things/smalltalk-things/efficient-implementation-smalltalk-block-returns http://www.wirfs-brock.com/allen/things/smalltalk-things/eff...