
Chapter 6
Translating JVM Code to MIPS Code
6.1 Introduction
6.1.1 What Happens to JVM Code?
Compilation is not necessarily over with after the class file is constructed. At “execution,”
the class is loaded into the JVM and then interpreted. In the Oracle HotSpot
TM
VM, once
a method has been executed several times, it is compiled to native code—code that can
be directly executed by the underlying computer. Once these hotspots in the code are
compiled, the native code is cached so that it may be re-used in subsequent invocations of
the method. So at run-time, control shifts back and forth between JVM code and native
code. Of course, the native code runs ...