Volume 32, Issue 3 p. 265-294
Research Article

Vmgen—a generator of efficient virtual machine interpreters

M. Anton Ertl

Corresponding Author

Institut für Computersprachen, Technische Universität Wien, Argentinierstraße 8, A‐1040 Wien, Austria

Institut für Computersprachen, Technische Universität Wien, Argentinierstraße 8, A‐1040 Wien, AustriaSearch for more papers by this author
David Gregg

Department of Computer Science, Trinity College, Dublin 2, Ireland

Search for more papers by this author
Andreas Krall

Institut für Computersprachen, Technische Universität Wien, Argentinierstraße 8, A‐1040 Wien, Austria

Search for more papers by this author
Bernd Paysan

Stockmannstr. 14, D‐81477 München, Germany

Search for more papers by this author
First published: 28 January 2002
Citations: 24

Abstract

In a virtual machine interpreter, the code for each virtual machine instruction has similarities to code for other instructions. We present an interpreter generator that takes simple virtual machine instruction descriptions as input and generates C code for processing the instructions in several ways: execution, virtual machine code generation, disassembly, tracing, and profiling. The generator is designed to support efficient interpreters: it supports threaded code, aching the top‐of‐stack item in a register, combining simple instructions into superinstructions, and other optimizations. We have used the generator to create interpreters for Forth and Java. Theresulting interpreters are faster than other interpreters for the same languages and they are typically 2–10 times slower than code produced by native‐code compilers. We also present results for the effects of the individual optimizations supported by the generator. Copyright © 2002 John Wiley & Sons, Ltd

The full text of this article hosted at iucr.org is unavailable due to technical difficulties.