Detect redundant initialization checks using static analysis
AssigneeOracle International Corporation
InventorsChristian WIMMER, Liviu Codrut STANCU, David KOZAK
Life of this patent
Estimating the term…
Abstract
A method detects redundant initialization checks using static analysis. The method includes inlining source code to generate inlined code. The inlined code includes instructions to materialize an element within a scope. The method further includes consolidating the inlined code to form consolidated code by moving the instructions to materialize the element to a point where the element escapes the scope. The method further includes running a points-to analysis on the consolidated code. The method further includes reducing the consolidated code to generate reduced code by removing an initialization check from the consolidated code.
Claims20
A method comprising:
- inlining source code to generate inlined code, wherein the inlined code comprises instructions to materialize an element within a scope;
- consolidating the inlined code to form consolidated code by moving the instructions to materialize the element to a point where the element escapes the scope;
- running a points-to analysis on the consolidated code;
- and
- reducing the consolidated code to generate reduced code by removing an initialization check from the consolidated code.
A system comprising
- at least one processor;
- and
- an application that, when executing on the at least one processor, performs operations comprising:
- inlining source code to generate inlined code, wherein the inlined code comprises instructions to materialize an element within a scope,
- consolidating the inlined code to form consolidated code by moving the instructions to materialize the element to a point where the element escapes the scope,
- running a points-to analysis on the consolidated code, and
- reducing the consolidated code to generate reduced code by removing an initialization check from the consolidated code.
A non-transitory computer readable medium comprising instructions executable by at least one processor to perform:
- inlining source code to generate inlined code, wherein the inlined code comprises instructions to materialize an element within a scope;
- consolidating the inlined code to form consolidated code by moving the instructions to materialize the element to a point where the element escapes the scope;
- running a points-to analysis on the consolidated code;
- and
- reducing the consolidated code to generate reduced code by removing an initialization check from the consolidated code.
Dependencies are inferred from the claim text.