Method and apparatus for creating efficient native methods that extend a bytecode interpreter
US6886157B2 · kind B2 · utility
Assignee
Inventors
Key dates
| Filing date | May 25, 2001 |
| Grant date | Apr 26, 2005 |
| Priority date | — |
| Expiry date | May 2, 2023 |
Classification
- Technology area (CPC G)Physics
- CPC primaryG06F9/45504
- WIPO fieldComputer technology
- WIPO sectorElectrical engineering
Abstract
Methods, apparatus and computer program products are disclosed for a method of invoking a native method in a Java virtual machine (“JVM”). A special-purpose fast interface, executing in conjunction with an interpreter loop, for native methods reduces C stack recursion in the JVM. The interface performs as an extension to the interpreter loop component in the JVM in that a native method, invoked via the special-purpose interface, is able to modify the interpreter loop state if necessary. This is done without adding new bytecode instructions. A method of executing a native method in a Java virtual machine is described. The JVM first determines whether a native method is to be handled by a special native interface or one of multiple other native interfaces. If it is determined that the method is to be handled by the special native interface, the method is invoked and passed arguments enabling it to access the state of the JVM. The method is then executed. The state of the JVM is adjusted based on the execution of the method such that transition between the interpreter loop and the native method via the special native interface is minimized.
Source: USPTO / EPO open patent data. Objective bibliographic and citation counts.