The Java bytecode language lacks expressiveness for traditional compiler op
timizations, making this portable, secure software distribution format inef
ficient as a program representation for high performance. This inefficiency
results from the underlying stack model, as well as the fact that many byt
ecode operations intrinsically include sub-operations (e.g. iaload includes
the address computation, array bounds checks and the actual load of the ar
ray element), The stack model, with no operand registers and limiting acces
s to the top of the stack, prevents the re-use of values and bytecode re-or
dering, In addition, the language has no mechanism to indicate which sub-op
erations in the Java bytecode stream are redundant or subsumed by previous
ones. As a consequence, the Java bytecode language inhibits the expression
of important compiler optimizations, including register allocation and inst
ruction scheduling.
The Java bytecode stream generated by a Java bytecode compiler is a signifi
cantly under-optimized program representation, The most common solution to
overcome this inefficiency is the use of a just-in-time (JIT) compiler to n
ot only generate native code, but perform optimization as well. However, th
e latter is a time-consuming operation in an already time-constrained trans
lation process, In this paper we present an alternative to an optimizing JI
T compiler that makes use of code annotations generated by a Java bytecode
compiler. These annotations carry information concerning compiler optimizat
ions. During the translation process, an annotation-aware Java Virtual Mach
ine (JVM) system then uses this information to produce high-performance nat
ive code without performing much of the necessary analyses or transformatio
ns. We describe the implementation of a prototype of an annotation-aware JV
M consisting of an annotation-aware JIT compilation system. We conclude the
paper showing performance results comparing our system with other JVMs run
ning on SPARC architecture. Copyright (C) 2000 John Wiley & Sons, Ltd.