Related articles |
---|
[7 earlier articles] |
Re: virtual machine efficiency calumg@no.onetel.spam.com (Calum Grant) (2004-12-30) |
Re: virtual machine efficiency cr88192@hotmail.com (cr88192) (2004-12-31) |
Re: virtual machine efficiency cr88192@hotmail.com (cr88192) (2004-12-31) |
Re: virtual machine efficiency strohm@airmail.net (John R. Strohm) (2005-01-01) |
Re: virtual machine efficiency kers@hpl.hp.com (Chris Dollin) (2005-01-12) |
Re: virtual machine efficiency cr88192@hotmail.com (cr88192) (2005-01-14) |
Re: virtual machine efficiency kers@hpl.hp.com (Chris Dollin) (2005-01-15) |
Re: virtual machine efficiency hannah@schlund.de (2005-01-30) |
From: | Chris Dollin <kers@hpl.hp.com> |
Newsgroups: | comp.compilers |
Date: | 15 Jan 2005 20:52:10 -0500 |
Organization: | HPLB |
References: | 04-12-151 05-01-038 05-01-041 |
Keywords: | VM |
Posted-Date: | 15 Jan 2005 20:52:10 EST |
cr88192 wrote:
> "Chris Dollin" <kers@hpl.hp.com> wrote in message
>> 16-bit instructions turned out to be an interesting and occasionally
>> frustrating choice, as was the decision to try and combine stack-based
>> and register-aka-local-variable instructions. That the machine had
>> *two* stacks [1] - one for values, one for locals/return addresses - was
>> an automatic consequence of umpteen years writing Pop11 (and similar)
>> code.
> mine also has two stacks: the value stack; and a kind of opaque
> meta-stack used for control.
> locals were stored in their own space which is indirectly referenced
> by the control stack (variables and similar are accessed with their
> own opcodes).
It's important to note that the two stacks in my VM are decoupled and
not just a convenience - the value stack doesn't get cut back just
because you return from a procedure, for example, and the value stack
can grow arbitrarily large during a procedure's execution.
It's not quite as free-and-easy as Pop11's open stack, partly because
one of the points of designing Spice [no, not that one] was to get
most of the benefits of the open-stack model without the gotchas -
although most of the constraints are imposed by code generation rather
than by the instruction set. (Although one of the procedure-entry
instructions explicitly transfers values off the value stack into the
control stack.)
--
Chris "electric hedgehog" Dollin
Return to the
comp.compilers page.
Search the
comp.compilers archives again.