Related articles |
---|
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? u.hobelmann@web.de (Ulrich Hobelmann) (2003-02-12) |
Re: Stack, register, message based or hybrid for virtual machine? anton@mips.complang.tuwien.ac.at (2003-02-21) |
From: | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
Newsgroups: | comp.compilers |
Date: | 21 Feb 2003 00:54:26 -0500 |
Organization: | Institut fuer Computersprachen, Technische Universitaet Wien |
References: | 03-02-053 03-02-068 |
Keywords: | architecture, design |
Posted-Date: | 21 Feb 2003 00:54:26 EST |
Ulrich Hobelmann <u.hobelmann@web.de> 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).
- anton
--
M. Anton Ertl
anton@mips.complang.tuwien.ac.at
http://www.complang.tuwien.ac.at/anton/home.html
Return to the
comp.compilers page.
Search the
comp.compilers archives again.