Lowering Java try statements in a symbolic description language
AssigneeOracle International Corporation
InventorPaul David Sandoz
Life of this patent
Estimating the term…
Abstract
Techniques for lowering Java try statements in a symbolic description language are disclosed, including: obtaining a set of Java source code; determining that the set of Java source code includes a try statement; and generating, based on the set of Java source code, a symbolic description language (SDL) model including a lowered SDL representation of the try statement. The lowered SDL representation of the try statement includes: a body including a set of basic SDL blocks; an exception region including (a) a subgraph of the set of basic SDL blocks and (b) an operation covered by the exception region; and a catch entry block, in the set of basic SDL blocks, that is declared as a successor block for when the operation covered by the exception region throws an exception.
Claims20
One or more non-transitory computer-readable media storing instructions which, when executed by one or more hardware processors, cause performance of operations comprising:
- obtaining a set of Java source code;
- determining that the set of Java source code comprises a try statement;
- generating, based on the set of Java source code, a symbolic description language (SDL) model that represents the set of Java source code and comprises a lowered SDL representation of the try statement;
- wherein the lowered SDL representation of the try statement comprises:
- a body comprising a set of basic SDL blocks;
- an exception region comprising a subgraph of the set of basic SDL blocks and an operation covered by the exception region;
- and
- a catch entry block, in the set of basic SDL blocks, that is declared as a successor block for when the operation covered by the exception region throws an exception;
- based at least in part on the SDL model that represents the set of Java source code:
- generating a new bytecode corresponding to the set of Java source code, at least by:
- identifying one or more bytecode operations corresponding to low-level operations in the SDL model;
- and
- generating bytecode instructions corresponding to the bytecode operations;
- and
- executing the new bytecode corresponding to the set of Java source code.
A system comprising:
- one or more hardware processors;
- one or more non-transitory computer-readable media;
- and
- program instructions stored on the one or more non-transitory computer readable media which, when executed by the one or more hardware processors, cause the system to perform operations comprising:
- obtaining a set of Java source code;
- determining that the set of Java source code comprises a try statement;
- generating, based on the set of Java source code, a symbolic description language (SDL) model that represents the set of Java source code and comprises a lowered SDL representation of the try statement;
- wherein the lowered SDL representation of the try statement comprises:
- a body comprising a set of basic SDL blocks;
- an exception region comprising a subgraph of the set of basic SDL blocks and an operation covered by the exception region;
- and
- a catch entry block, in the set of basic SDL blocks, that is declared as a successor block for when the operation covered by the exception region throws an exception;
- based at least in part on the SDL model that represents the set of Java source code:
- generating a new bytecode corresponding to the set of Java source code, at least by:
- identifying one or more bytecode operations corresponding to low-level operations in the SDL model;
- and
- generating bytecode instructions corresponding to the bytecode operations;
- and
- executing the new bytecode corresponding to the set of Java source code.
A method comprising:
- obtaining a set of Java source code;
- determining that the set of Java source code comprises a try statement;
- generating, based on the set of Java source code, a symbolic description language (SDL) model that represents the set of Java source code and comprises a lowered SDL representation of the try statement;
- wherein the lowered SDL representation of the try statement comprises:
- a body comprising a set of basic SDL blocks;
- an exception region comprising a subgraph of the set of basic SDL blocks and an operation covered by the exception region;
- and
- a catch entry block, in the set of basic SDL blocks, that is declared as a successor block for when the operation covered by the exception region throws an exception;
- based at least in part on the SDL model that represents the set of Java source code:
- generating a new bytecode corresponding to the set of Java source code, at least by:
- identifying one or more bytecode operations corresponding to low-level operations in the SDL model;
- and
- generating bytecode instructions corresponding to the bytecode operations;
- and
- executing the new bytecode corresponding to the set of Java source code;
- wherein the method is performed by at least one device including a hardware processor.
Dependencies are inferred from the claim text.