Systems and methods for increasing the execution speed of virtual machine instructions for a function are provided. A portion of the virtual machine instructions of the function are compiled into native machine instructions so that the function includes both virtual and native machine instructions. Execution of the native machine instructions may be accomplished by overwriting a virtual machine instruction of the function with a virtual machine instruction that specifies execution of the native machine instructions. Additionally, the original virtual machine instruction may be stored so that the original virtual machine instructions can be regenerated. |
Citations|
| US5329611 | Jun 21, 1993 | Jul 12, 1994 | International Business Machines Corp. | Scalable flow virtual learning neurocomputer | | US5367685 | Dec 22, 1992 | Nov 22, 1994 | FirstPerson, Inc. | Method and apparatus for resolving data references in generated code | | US5586328 | Oct 21, 1994 | Dec 17, 1996 | Microsoft Corporation | Module dependency based incremental compiler and method | | US5758162 | Jan 22, 1996 | May 26, 1998 | Matsushita Electric Industrial Co., LTD. | Program translating apparatus and a processor which achieve high-speed execution of subroutine branch instructions | | US5768593 | Mar 22, 1996 | Jun 16, 1998 | Connectix Corporation | Dynamic cross-compilation system and method | | US5845298 | Apr 23, 1997 | Dec 1, 1998 | Sun Microsystems, Inc. | Write barrier system and method for trapping garbage collection page boundary crossing pointer stores | | US5898850 | Mar 31, 1997 | Apr 27, 1999 | International Business Machines Corporation | Method and system for executing a non-native mode-sensitive instruction within a computer system | | US5905895 | Mar 7, 1997 | May 18, 1999 | International Business Machines Corporation | Method and system for optimizing non-native bytecodes before bytecode interpretation | | US5925123 | Jan 23, 1997 | Jul 20, 1999 | Sun Microsystems, Inc. | Processor for executing instruction sets received from a network or from a local memory | | US5953736 | Apr 23, 1997 | Sep 14, 1999 | Sun Microsystems, Inc. | Write barrier system and method including pointer-specific instruction variant replacement mechanism | | US5995754 | Oct 6, 1997 | Nov 30, 1999 | Sun Microsystems, Inc. | Method and apparatus for dynamically optimizing byte-coded programs | | US6038394 | Jan 8, 1998 | Mar 14, 2000 | Loran Network Management Ltd. | Condition handling using script interpreters | | US6044220 | Feb 25, 1997 | Mar 28, 2000 | Motorola, Inc. | Method and apparatus for operating a data processor to execute software written using a foreign instruction set | | US6118940 | Nov 25, 1997 | Sep 12, 2000 | International Business Machines Corp. | Method and apparatus for benchmarking byte code sequences | | US6170083 | Nov 12, 1997 | Jan 2, 2001 | Intel Corporation | Method for performing dynamic optimization of computer code | | US6292883 | Sep 28, 1998 | Sep 18, 2001 | U.S. Philips Corporation | Converting program-specific virtual machine instructions into variable instruction set | | US6332216 | Mar 9, 1999 | Dec 18, 2001 | Hewlett-Packard Company | Hybrid just-in-time compiler that consumes minimal resource | | US6349377 | Sep 28, 1998 | Feb 19, 2002 | U.S. Philips Corporation | Processing device for executing virtual machine instructions that includes instruction refeeding means |
Referenced by|
| US7124283 | Jun 10, 2003 | Oct 17, 2006 | Renesas Technology Corp. | Hardware accelerator for a platform-independent code | | US7574700 | Mar 31, 2005 | Aug 11, 2009 | Sun Microsystems, Inc. | Supporting dynamically-typed languages in typed assembly languages | | US7669191 | Jun 14, 2005 | Feb 23, 2010 | Xilinx, Inc. | Compile-time dispatch of operations on type-safe heterogeneous containers | | US7840951 | Aug 22, 2003 | Nov 23, 2010 | Oracle America, Inc. | Reducing the overhead involved in executing native code in a virtual machine through binary reoptimization | | US8160725 | May 20, 2009 | Apr 17, 2012 | VEGA Grieshaber KG | Energy saving control for a field device |
Claims1. In a computer system, a method for increasing the execution speed of virtual machine instructions at runtime, the method comprising: - receiving a first virtual machine instruction;
- generating, at runtime, a new virtual machine instruction that represents or references one or more native instructions that can be executed instead of said first virtual machine instruction; and
- executing said new virtual machine instruction instead of said first virtual machine instruction.
2. The method of claim 1, further comprising overwriting a selected virtual machine instruction with a new virtual machine instruction, the new virtual machine instruction specifying execution of the at least one native machine instruction. 3. The method of claim 2, wherein the new virtual instruction includes a pointer to the at least one native machine instruction. 4. The method of claim 2, further comprising storing the selected virtual machine instruction before it is overwritten. 5. The method of claim 2, further comprising storing a back pointer to a location of the new virtual machine instruction. 6. The method of claim 2, wherein the new virtual machine instruction includes a pointer to a data block in which is stored the at least one native machine instruction, a copy of the selected virtual machine instruction, and a back pointer to location of the new virtual machine instruction. 7. The method of claim 6, further comprising generating the virtual machine instruction that were input by storing the copy of the selected virtual machine instruction stored in the data block at the location specified by the back pointer. 8. In a computer system, a method for increasing the execution speed of virtual machine instructions, the method comprising: - inputting virtual machine instructions for a function;
- compiling a portion of the function into at least one native machine instruction so that the function includes both virtual and native machine instruction;
- representing said at least one native machine instruction with a new virtual machine instruction that is executed after the compiling of the fuction.
9. A stored data structure of hybrid virtual and native machine instructions, comprising: - a sequence of virtual machine instructions for a function including a new virtual machine instruction;
- at least one native machine instruction specified by the new virtual machine instruction for execution with the sequence of virtual machine instructions; and
- a computer readable medium that stores the sequence of virtual machine instructions and the at least one native machine instruction;
wherein - the at least one native machine instruction is stored in a data block, and
- the data block stores a copy of a selected virtual machine instruction that was overwritten in the sequence of virtual machine instructions by the new virtual machine instruction.
10. The stored data structure of claim 9, wherein the new virtual machine instruction includes a pointer to the at least one native machine instruction. 11. The stored data structure of claim 9, wherein the block stores a pointer to a location of the new virtual machine instruction in the sequence of virtual machine instructions. 12. The stored data structure of claim 9, wherein the data block is stored in an array of blocks. 13. The stored data structure of claim 9, wherein the at least one native machine instruction is generated from a compilation of a portion of the sequence of virtual machine instructions beginning with the selected virtual machine instruction. 14. The stored data structure of claim 9, wherein the virtual machine instruction are Java virtual machine instructions. |