发明名称 |
Unifying static and dynamic compiler optimizations in source-code bases |
摘要 |
Techniques are described for unifying static and dynamic compiler optimizations in source code bases. In an embodiment, a first compiler compiles source code of a target function to generate ahead-of-time (AOT) compiled machine code. A second compiler compiles the source code to generate an intermediate representation (IR) of the target function. In response to determining that the target function should be just-in-time (JIT) compiled, the AOT-compiled machine code for the target function is linked to the IR of the target function. During runtime, a physical processor executes AOT-compiled machine code of an executable program. When the target function is encountered for the first time, a JIT compiler is invoked. The JIT compiler generates JIT-compiled machine code for the target function. The physical processor executes the JIT-compiled machine code in place of the AOT-compiled machine code for the target function. |
申请公布号 |
US9417857(B2) |
申请公布日期 |
2016.08.16 |
申请号 |
US201514594954 |
申请日期 |
2015.01.12 |
申请人 |
ORACLE INTERNATIONAL CORPORATION |
发明人 |
Chafi Hassan;Chang Mason;Sedlar Eric |
分类号 |
G06F9/45;G06F9/455 |
主分类号 |
G06F9/45 |
代理机构 |
Hickman Palermo Becker Bingham LLP |
代理人 |
Hickman Palermo Becker Bingham LLP ;Bingham Marcel K. |
主权项 |
1. A method comprising:
compiling, with a first compiler, source code of a target function to generate ahead-of-time (AOT) compiled machine code for the target function; compiling, with a second compiler, the source code of the target function to generate an intermediate representation (IR) of the target function; wherein the source code of the target function is associated with a particular annotation that indicates that the target function should be just-in-time (JIT) compiled; determining, based on the particular annotation, that the target function has been marked for JIT compilation; in response to determining that the target function has been marked for JIT compilation, linking the AOT-compiled machine code for the target function to the IR of the target function; wherein linking the AOT-compiled machine code for the target function to the IR of the target function comprises adding instructions to the AOT-compiled machine code, wherein the added instructions cause an executable program generated by the first compiler to invoke a JIT compiler; and wherein the method is performed by one or more computing devices. |
地址 |
Redwood Shores CA US |