Related articles |
---|
A stack based X Machine in C++ tarun2701@msn.com (2002-12-19) |
Re: A stack based X Machine in C++ joachim_d@gmx.de (Joachim Durchholz) (2002-12-30) |
Re: A stack based X Machine in C++ anton@mips.complang.tuwien.ac.at (2003-01-12) |
From: | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
Newsgroups: | comp.compilers |
Date: | 12 Jan 2003 18:02:51 -0500 |
Organization: | Institut fuer Computersprachen, Technische Universitaet Wien |
References: | 02-12-086 02-12-126 |
Keywords: | interpreter |
Posted-Date: | 12 Jan 2003 18:02:51 EST |
Joachim Durchholz <joachim_d@gmx.de> writes:
>The interpreter is just an endless loop like this:
...
>Alternatively, you could use vmgen, which will generate the above main
>loop for you and optimize it (the above pseudocode is not very
>efficient).
Thanks for the plug. You can find vmgen at
http://www.complang.tuwien.ac.at/anton/vmgen/
Vmgen does a little more than generating the loop (and actually, if
you use a loop, it is not in the generated part, but in the part that
you currently copy and adapt manually from template files); in
particular, it generates code for accessing stack operands as well as
immediate operands, for generating VM code, for disassembling and
tracing VM code (useful for debugging the VM interpreter and the front
end), and for profiling VM instruction sequences (useful for selecting
VM superinstructions).
- 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.