RE: [stack] Remember how we needed two stacks? Maybe we don't.

wtanksley@bigfoot.com — 2000-05-10 21:28:58

From: srenner@... [mailto:srenner@...]

>The Joy-like VM has been rewritten. Now it is called "toy". This time,
>it seemed not to need two stacks. It is true that this means that the
>VM is implemented by a reentrant function, but the only time it will
>reenter is when it executes a nested quotation. I think. That is, if
>the stack is s, and the top of the stack is the quotation q0: [q1 i],
>and we execute q0 with the procedure call (in Oberon):

Good work. Of course, you realise that it really is using two stacks: one
of them is a stack you create yourself, and the other one is the Oberon
procedure stack. This is good optimization, within the limits you set
yourself by limiting yourself to Oberon (or any other HLL).

But it doesn't get rid of the second stack. :-)

>sr

-Billy