The Cacao interpreter

The Cacao Java VM contains a fast interpreter (not quite as fast as the JIT, but more portable).

Building and using the Cacao interpreter

Unfortunately the Cacao maintainers focus on the JIT compiler and don't really maintain the intepreter. Now and then they make changes that break the interpreter and then don't fix it, so in some releases of Cacao the interpreter is broken. A known-good version is Cacao-0.97 (download) working with Classpath 0.92.

To build it, you need vmgen, which comes with Gforth (available as a package on many popular platforms). When you build it, IIRC you have to specify that you want to build the interpreter.

When you run the interpreter, you have to use -noverify, or Cacao will crash.

If you have trouble building it, please let me know, and I will work out how I did it and add a transkript here (and mail it to you). If you are successful, please mail me a transcript and I will replace this paragraph with it (with attribution).

Papers

A Fast Java Interpreter
gives an overview of the Cacao interpreter.
Implementing an Efficient Java Interpreter
has quite a bit of overlap with "A Fast Java Interpreter
vmgen - A Generator of Efficient Virtual Machine Interpreters
discusses Vmgen and its capabilities in general, but also its use to implement the Cacao interpreter and some performance results.
Superinstructions and Replication in the Cacao JVM interpreter
about the problems of implementing these optimizations in a JVM interpreter, how to solve them, and how much speedup we get (up to a factor of 4).

Anton Ertl