¶Four stacks
- Stack 0: Inputs and outputs of invocations
- Stack 1: Invocation receivers, enclosed values
- Stack 2: Local scratch space
- Stack 3: Local scratch space
Putting invocation receivers and enclosed values on the same stack makes sense, because then invoking a quotation will “replace” the quotation with its enclosed value before the selected branch starts executing. (Note that you
¶Updates
This is no longer the stack layout that I'm actually using; I've switched to “Bethel stacks”.