Methods and apparatus for reducing the number of runtime checks performed
during the execution of a virtual machine. According to one aspect of the present
invention, a computer system includes a preloader, a compiler, and a virtual machine.
The preloader is arranged to determine whether a bytecode makes an active reference
to a class which requires an execution of a static initializer, and is also arranged
to determine if the class has a superclass which requires the execution of the
static initializer. The compiler is arranged to accept a source file generated
by the preloader as input and to produce an object file, and the virtual machine
is arranged to execute the object file.