CACAO - A 64 bit JavaVM Just-in-Time Compiler

Andreas Krall and Reinhard Grafl
Institut für Computersprachen
Technische Universität Wien
Argentinierstraße 8
A-1040 Wien, Austria


This article describes the design and implementation of CACAO, a just in time compiler for Java. The CACAO system translates Java byte code on demand into native code for the ALPHA processor. During this translation process the stack oriented Java byte code is transformed into a register oriented intermediate code. Local variables and stack locations are replaced by pseudo registers eliminating the 32 bit restriction on address types. A fast register allocation algorithm is applied to map the pseudo registers to machine registers. During code generation, field offsets are computed for proper alignment on 64 bit architectures. Even though the CACAO system has to incur loading and compilation time, it executes Java programs up to 85 times faster than the JDK interpreter, up to 7 times faster than the kaffe JIT compiler. It is slightly slower than equivalent C programs compiled at the highest optimization level.