Abstract

Java virtual machine (JVM) is an architecture-independent code execution environment. It has recently been used not only for the Java language but also for other languages such as Scheme and ML. On JVM, however, all values are 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 languages on JVM inefficient. In particular, implementation of a dynamically typed language is very inefficient because all possible values including frequently 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 reference types and a tagged integer type. This allows a more efficient implementation of dynamically typed language on JVM. It does not require any new instruction, maintains binary-compatibility of existing bytecode, and retains the safety of the original JVM. We modified an existing Scheme system running 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 penalty for Spec JVM benchmarks. Copyright © 2000 John Wiley & Sons, Ltd.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call