Improved frameworks for loading and execution of portable, platform independent
programming instructions within a virtual machine are disclosed. The improved frameworks
provide a mechanism that will generally improve the runtime performance of virtual
machines by eliminating the need to always traverse a constant pool at runtime
to execute a Java instruction. In effect, the described system contemplates doing
some extra work during the loading of a class into a virtual machine by obtaining
the information from the constant pool during loading and representing that information
in a form that can be used more efficiently at runtime. Accordingly, methods for
creating data structures suitable for use by a virtual machine to execute load
constant commands, as well as methods for execution of Java load constant instructions
are disclosed. The data structures can include a code portion having a load constant
computer executable command, and a data stream having data corresponding to the
load constant computer executable command.