[lworld] RFR: 8359370: [lworld] allow instance fields of identity classes to be readable in the prologue phase
Vicente Romero
vromero at openjdk.org
Mon Aug 18 18:19:20 UTC 2025
On Fri, 15 Aug 2025 21:38: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
test/langtools/tools/javac/SuperInit/EarlyAssignmentNoPreview1.java line 5:
> 3: * @bug 8334258
> 4: * @summary Disallow early assignment if FLEXIBLE_CONSTRUCTORS preview feature is not enabled
> 5: * @compile/fail/ref=EarlyAssignmentNoPreview1.out --release 24 -XDrawDiagnostics EarlyAssignmentNoPreview1.java
this test along with EarlyAssigmentNoPreview 2 and 3 are failing. But the idea is to integrate this PR after the code for flexible constructor bodies have been merged into lworld, which should make these 3 tests pass
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1523#discussion_r2283113135
More information about the valhalla-dev
mailing list