Re: A stack based X Machine in C++ (Anton Ertl)
12 Jan 2003 18:02:51 -0500

          From comp.compilers

Related articles
A stack based X Machine in C++ (2002-12-19)
Re: A stack based X Machine in C++ (Joachim Durchholz) (2002-12-30)
Re: A stack based X Machine in C++ (2003-01-12)
| List of all articles for this month |

From: (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 <> 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

Thanks for the plug. You can find vmgen at

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

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.