|[ANN] Vmgen: generate efficient virtual machine interpreters email@example.com (2001-05-03)|
|From:||firstname.lastname@example.org (Anton Ertl)|
|Date:||3 May 2001 13:39:33 -0400|
|Organization:||Institut fuer Computersprachen, Technische Universitaet Wien|
|Posted-Date:||03 May 2001 13:39:33 EDT|
Vmgen generates much of the code for efficient virtual machine (VM)
interpreters from simple descriptions of the VM instructions. It
generates code for executing VM instructions (with optional tracing),
for generating VM code, for disassembling VM code, and for profiling
VM instruction sequences. A VM instruction description looks like
add ( i1 i2 -- i )
i = i1+i2;
Vmgen supports several techniques for writing efficient interpreters:
virtual machine interpreters, threaded code, combining VM instructions
into superinstructions, keeping the top-of-stack in a register,
scheduling the dispatch of the next VM instruction, and a couple of
minor optimizations. Interpreters created with vmgen usually are
faster than competing interpreters and are typically only a factor of
2-10 slower than the code generateed by native-code compilers.
Vmgen has special support for stack-based VMs (but it can also be
used to advantage when implementing a register-based VM).
The main shortcoming in the current release is the lack of a user
manual; however, there is a paper describing vmgen's operation (at
http://www.complang.tuwien.ac.at/anton/vmgen/), and there is a simple,
working and somewhat commented example of using vmgen (in directory
vmgen-ex). I hope to write the user manual during the summer.
The current release requires GCC both for building and for compiling
the resulting interpreters (threaded code cannot be implemented in
M. Anton Ertl
Return to the
Search the comp.compilers archives again.