[code-reflection] RFR: Uninitialized variables [v2]
Paul Sandoz
psandoz at openjdk.org
Fri Oct 25 22:12:35 UTC 2024
On Fri, 25 Oct 2024 15:41:40 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:
>> Model uninitialized variables as a var operation with no operand.
>>
>> This is much simpler than #263
>
> Paul Sandoz has updated the pull request incrementally with one additional commit since the last revision:
>
> Updates to HAT
Note i did not update the modeling of pattern variables to use uninitialized var ops. A var op modeling a pattern variable is declared just before the op modeling nearest ancestor statement. In source this would be equivalent to declaring a variable that is not definitely assigned, which of course is not possible.
If we modeled a pattern variable using an uninitialized var op then the SSA transformation would fail because a join point is identified for the pattern variable associated with the pattern. This could also be considered a limitation with the current SSA algorithm given the way the pattern variable is accessed. There should be no need to create a join point for such pattern variables. Perhaps the alternative SSA construction algorithm #214 fixes this?
-------------
PR Comment: https://git.openjdk.org/babylon/pull/264#issuecomment-2438949073
More information about the babylon-dev
mailing list