[lworld] RFR: 8334484: [lworld] new translation strategy for instance field initializers [v3]

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Apr 1 15:15:26 UTC 2025


On Mon, 31 Mar 2025 17:05:34 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> > It seems like there's few more cleanup opportunities now that we detect "early" strict field instance reads in `Resolve` (which make things a lot simpler).
> > Note: a possible different implementation tactic could be to add some info to JCIdent/JCFieldAccess, so that we can record that the accessed field was instance strict, and that access was "early" (or, we could create a special variable symbol to communicate this). This would eliminate the need for a map. And would also be a bit more precise when rewriting -- because we can only rewrite field accesses that have the special tree/symbol -- and leave the other in place.
> 
> not sure what would be the benefit of rewriting some accesses and some not, also there could be two sources of truth for a given field

Yeah - it makes the rewrital easier (because you can tell what to rewrite more easily), but you still need to know the list of symbols to proxy upfront

-------------

PR Comment: https://git.openjdk.org/valhalla/pull/1403#issuecomment-2769704106


More information about the valhalla-dev mailing list