发明名称 |
Self-optimizing interpreter and snapshot compilation |
摘要 |
A method for a compiler includes receiving, by the compiler and from an interpreter, a representation of a code section having a control path that changes the representation. The representation has profiling data, and the profiling data has a threshold. The method further includes performing, by the compiler and based on the threshold, a partial evaluation of the interpreter executing the representation, compiling, by the compiler, a machine code of the representation, with the control path replaced by a deoptimization point during the compilation of the machine code, triggering the deoptimization point during execution of the machine code, and returning execution to the interpreter based on the triggering. |
申请公布号 |
US8930920(B2) |
申请公布日期 |
2015.01.06 |
申请号 |
US201213731698 |
申请日期 |
2012.12.31 |
申请人 |
Oracle International Corporation |
发明人 |
Wuerthinger Thomas;Simon Douglas Norman;Wimmer Christian;Stadler Lukas;Duboscq Gilles Marie |
分类号 |
G06F9/45;G06F9/455 |
主分类号 |
G06F9/45 |
代理机构 |
Osha Liang LLP |
代理人 |
Osha Liang LLP |
主权项 |
1. A method for a compiler, comprising:
receiving, by the compiler and from an interpreter, a representation of a code section having a control path that changes the representation, wherein the representation is an abstract syntax tree (AST) comprising a plurality of nodes, each of the plurality of nodes storing associated profiling data, and wherein the profiling data comprises a threshold; compiling, by the compiler, a machine code of the representation by:
performing, based on the threshold, a partial evaluation of the interpreter executing the representation,wherein the control path is replaced with a deoptimization point during compilation of the machine code; triggering the deoptimization point during execution of the machine code; and returning execution to the interpreter based on the triggering. |
地址 |
Redwood Shores CA US |