News

Object-Model Independence via Code Implants [abstract]
Michal Cierniak, Neal Glew, Spyridon Triantafyllis, Marsha Eng, Brian Lewis, and James Stichnoth
Proceedings of the 2003 Workshop on Multiparadigm Programming with OO Languages, October 2003.

Executing a program in a managed runtime environment, such as a Java or CLI platform, requires close cooperation between a virtual machine (VM) and user code, usually compiled by a just-in-time compiler (JIT). Although operations such as field access, virtual method dispatch, and type casting lie in the VM domain, having user code call the VM for such operations introduces serious inefficiencies. Thus, most current JITs directly generate code for these operations based on assumptions about the VM. Although this approach offers good performance, it locks the VM and the JIT together, making modifications difficult. Changing how these operations are implemented requires changes to the VM and to JITs and other components that would not otherwise be affected. Thus experimentation with new algorithms and strategies is difficult, which may ultimately hurt performance. In addition, extending a platform to support new programming paradigms may require reimplementing the entire system.

We propose a mechanism for VMs to directly implant code into JIT-compiled code. This mechanism enforces a strict interface between the JIT and the VM without sacrificing performance. Among other things, this isolates most programming paradigm aspects within the VM, thus greatly facilitating multiparadigm support. This paper presents our system for code implants, gives an early evaluation of the mechanism, and describes how it could be used to implement several programming paradigm extensions to Java with relatively little implementation effort.