Java virtual machine (JVM) is an architecture-independent code execution en
vironment. It has recently been used not only for the Java language but als
o for other languages such as Scheme and ML. On JVM, however, all values ar
e statically typed as either immediate or reference, and types are checked
before the execution of a program to prove that invalid memory access will
never occur. This property sometimes makes implementation of other language
s on JVM inefficient, In particular, implementation of a dynamically typed
language is very inefficient because all possible values including frequent
ly used ones such as integers must be represented by instances of a class,
In this paper, we introduce a new type into JVM, which is a supertype of re
ference types and a tagged integer type. This allows a more efficient imple
mentation of dynamically typed language on JVM, It does not require any new
instruction, maintains binary-compatibility of existing bytecode, and reta
ins the safety of the original JVM, We modified an existing Scheme system r
unning on JVM to exploit this extension and got a factor of 20 speedup for
simple integer functions. Our extension imposes little performance penalty
on existing JVM code generated from Java; we observed essentially no penalt
y for Spec JVM benchmarks. Copyright (C) 2000 John Wiley & Sons, Ltd.