Patent Number: 6,298,477

Title: Method and apparatus for selecting ways to compile at runtime

Abstract: Apparatus, methods, and computer program products are disclosed for determining how to compile a program at runtime. A bytecode instruction associated with the program that can be compiled in multiple ways is retrieved and compiled in a particular way, typically the default way. At runtime, a virtual machine determines whether another way of compiling the bytecode instruction is more desirable and, if so, the bytecode is then recompiled the other way. In some embodiments, the portion of the program that contains the bytecode instruction to be recompiled is placed in a queue with other instructions that are to be recompiled. The virtual machine may examine changing requirements of the program that have developed at the program's execution in which the requirements are derived from profile data on each of the multiple ways the program can be compiled. The bytecode instruction within the program may be recompiled in a more preferred way based upon the profile data.

Inventors: Kessler; Peter B. (Palo Alto, CA)

Assignee: Sun Microsystems, Inc.

International Classification: G06F 9/455 (20060101); G06F 9/45 (20060101); G06F 009/45 ()

Expiration Date: 10/02/2018