On Thu, 4 Jun 2026 11:39:17 GMT, Vicente Romero <[email protected]> wrote:
>> When dealing with strict fields with initializers at the time we track them >> there is no constructor that we can use to later retrieve them at lowering >> time. Those fields can drop on the floor and no proxies are created for >> them. This PR fixes this issue, >> >> TIA >> >> >> >> >> --------- >> - [X] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Vicente Romero has updated the pull request incrementally with two additional > commits since the last revision: > > - merge > - review comments src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LocalProxyVarsGen.java line 131: > 129: earlyReads.addAll(constructorEarlyReads); > 130: } > 131: fieldsReadInPrologue.remove(tree.sym); you are calling remove twice here -- this seems not needed. And also it seems like you can consolidate Set<Symbol> constructorEarlyReads = fieldsReadInPrologue.remove(tree.sym); if (constructorEarlyReads != null) { if (earlyReads == null) { earlyReads = constructorEarlyReads; } else { earlyReads.addAll(constructorEarlyReads); } } src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LocalProxyVarsGen.java line 138: > 136: } > 137: > 138: public void allConstNormalized(Symbol.ClassSymbol csym) { should be allFieldNormalized? ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2507#discussion_r3356655031 PR Review Comment: https://git.openjdk.org/valhalla/pull/2507#discussion_r3356638299
