On Wed, 27 May 2026 11:27:03 GMT, Maurizio Cimadamore <[email protected]>
wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/UnsetFieldsInfo.java
>> line 50:
>>
>>> 48: * deletion without notice.</b>
>>> 49: */
>>> 50: public class UnsetFieldsInfo {
>>
>> I think the changes here can probably be avoided by having Gen work more
>> closely with Code. A PoC for this is here:
>>
>> https://github.com/openjdk/valhalla/compare/lworld...mcimadamore:valhalla:flow-codegen-unset-strict-fields?expand=1
>>
>> This also contains some other improvements:
>> * Make the Flow logic simpler, and closer to the spec
>> * Drop the extra proxy pass, and instead make LocalProxyGen works as part of
>> Gen::normalizeMethod
>
>> * Make the Flow logic simpler, and closer to the spec
>
> This part is required, as the current changes has issues with code like this:
>
>
> value class EarlyInitBeforePrologue {
> int y;
> int x = (y = 1);
>
> EarlyInitBeforePrologue() {
> int z = y;
> super();
> }
> }
>
> The problem is that we process the var initializers not at the start of the
> constructor, but before the super -- which then leads to issue.
Please review in one of the sub-review PRs listed in the description
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31120#discussion_r3322623544