发明名称 |
System and method for efficient compilation and invocation of function type calls |
摘要 |
A system and method for efficient compilation and invocation of function type calls in a virtual machine (VM), or other runtime environment, and particularly for use in a system that includes a Java Virtual Machine (JVM). In accordance with an embodiment, the system comprises a virtual machine for executing a software application; a memory space for the application byte code comprising callsites generated using a function type carrier; a bytecode to machine code compiler which performs MethodHandle invocation optimizations; a memory space for the compiled machine code; and a memory space for storing software objects as part of the software application. The system enables carrying the function type from the original MethodHandle to a callsite in the generated bytecode, including maintaining generics information for a function type acquired from a target function, and generating a callsite based on the generics information for the function object invocation. |
申请公布号 |
US9043768(B2) |
申请公布日期 |
2015.05.26 |
申请号 |
US201314028347 |
申请日期 |
2013.09.16 |
申请人 |
ORACLE INTERNATIONAL CORPORATION |
发明人 |
Öhrström Fredrik |
分类号 |
G06F9/44;G06F9/45;G06F9/455 |
主分类号 |
G06F9/44 |
代理机构 |
Tucker Ellis LLP |
代理人 |
Tucker Ellis LLP |
主权项 |
1. A method of generating code for function type calls in a runtime environment, comprising the steps of:
providing a computer which includes
a virtual machine for executing a software application thereon,a memory space configured for storing bytecode for the software application;wherein the bytecode includes callsites, anda bytecode-to-machine code compiler configured to optimize function reference invocations for use within the software application, including, during compilation of the bytecode and prior to execution of a particular callsite; acquiring a function reference that references a target function having a function type associated therewith; determining whether the function type associated with the target function is a function type that can be safely called from the particular callsite; and creating, upon determining that the function type associated with the target function can be safely called from the particular callsite, a function type carrier associated with the particular callsite via the bytecode-to-machine code compiler. |
地址 |
Redwood Shores CA US |