|Stack, register, message based or hybrid for virtual machine? visionary25@_nospam_hotmail.com (Vis Mike) (2003-02-11)|
|Re: Stack, register, message based or hybrid for virtual machine? email@example.com (Ulrich Hobelmann) (2003-02-12)|
|Re: Stack, register, message based or hybrid for virtual machine? firstname.lastname@example.org (2003-02-21)|
|From:||email@example.com (Anton Ertl)|
|Date:||21 Feb 2003 00:54:26 -0500|
|Organization:||Institut fuer Computersprachen, Technische Universitaet Wien|
|Posted-Date:||21 Feb 2003 00:54:26 EST|
Ulrich Hobelmann <firstname.lastname@example.org> writes:
>Vis Mike wrote:
>> I was thinking of some kind of hybrid. Anybody have any thoughts?
>> I'll post the complete code if interested, just wanted to brush on the
>> subject first.
>Just add those registers you need for certain things, use the stack
>for everything else.
The typical hybrid for an Algol-style language is to have the stack
for values within expressions, and have directly accessible locals for
local variables; there are some implicit registers around (e.g., VM
instruction pointer, stack pointer). E.g., the JavaVM takes this
approach. Allocating locals on a non-indexable stack is hard (at
least if you are interested in efficiency).
M. Anton Ertl
Return to the
Search the comp.compilers archives again.