[lworld] RFR: 8359370: [lworld] allow instance fields of identity classes to be readable in the prologue phase [v23]
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri Sep 5 17:48:36 UTC 2025
On Thu, 4 Sep 2025 20:17:08 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> Before this fix only strict fields were readable in the prologue phase. The proposed fix should allow any instance fields of identity classes to be readable in the prologue phase. This implies changes in flow analysis as before we were only tracking final and strict fields. There is also some "cooperation" needed in the code to detect cases when reading a field is not allowed in the prologue phase. For example some methods in Resolve don't have all the needed information at the moment they are dealing with some ASTs and part of the processing needs to be done in Attr
>>
>> TIA
>>
>> This PR is a remake of https://github.com/openjdk/valhalla/pull/1490
>
> Vicente Romero has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 35 commits:
>
> - Merge branch 'lworld' into JDK-8359370-v2
> - addressing last review comments
> - minor refactoring
> - addressing review comments
> - some documentation
> - moving isEarlyReference to Attr
> - additional changes, more tests
> - addressing review comments
> - removing unnecessary imports
> - addressing review comments
> - ... and 25 more: https://git.openjdk.org/valhalla/compare/59ffa2df...bf2310b7
Very nice code consolidation. The new code is more centralized, and there's no more division of labor between Attr and Resolve. I think we should eventually consider something like this for mainline. Kudos!
-------------
Marked as reviewed by mcimadamore (Committer).
PR Review: https://git.openjdk.org/valhalla/pull/1523#pullrequestreview-3190297742
More information about the valhalla-dev
mailing list