Compile-time folding of assumed constant values
Abstract:
A computer-implemented method includes: selecting, by a computer device, a set of fields in a program which are marked as final fields to be treated as constants; adding, by the computer device, detection logic to the program, the detection logic including a process that detects writes to the final fields to be treated as constants; compiling, by the computer device, the program into compiled code; executing, by the computer device, the compiled code; detecting, by the computer device, a write to a first one of the final fields to be treated as constants; and transitioning, by the computer device, execution of the compiled code from the compiled code to an interpreter for processing by compensation code that operates on the first one of the final fields to be treated as constants.
Public/Granted literature
Information query
Patent Agency Ranking
0/0