[lworld] RFR: 8354728: [lworld] Langtools work to update strict implementation to latest

Vicente Romero vromero at openjdk.org
Wed Apr 16 01:43:01 UTC 2025


On Tue, 15 Apr 2025 23:35:44 GMT, Chen Liang <liach at openjdk.org> wrote:

> The updates to the core libraries + langtools for the latest strict field initialization spec https://cr.openjdk.org/~dlsmith/jep401/jep401-20250409/specs/strict-fields-jvms.html is ready.
> 
> Currently, since there is no VM support, testing is restricted to generation by ClassFile API/javac and inspection through ClassFile API (and javap)
> 
> Not suitable for integration yet; StrictFinalInstanceFieldsTest requires VM side's support.

src/java.base/share/classes/jdk/internal/classfile/impl/CodeImpl.java line 301:

> 299:                         continue;
> 300:                     }
> 301:                     case 247 -> {

side: in some classes we use constants for the frame types here we are using literals, we probably should use the same approach always, this is not related to the PR but could be fixed in a separate issue

src/java.base/share/classes/jdk/internal/classfile/impl/StackMapDecoder.java line 178:

> 176:         if (offsetDelta < 0) throw new IllegalArgumentException("Invalid stack map frames order");
> 177:         // enclosing frames
> 178:         writeLarvalFrame:

not a big fan of using labels, I wonder if the code can be refactored to avoid using them

src/java.base/share/classes/jdk/internal/classfile/impl/StackMapDecoder.java line 299:

> 297:                 }
> 298:             }
> 299:             if (actualFrameType != 247 && !unsetFields.isEmpty() && !locals.contains(SimpleVerificationTypeInfo.UNINITIALIZED_THIS)) {

we should use a constant not a literal, 247, here

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1432#discussion_r2045794207
PR Review Comment: https://git.openjdk.org/valhalla/pull/1432#discussion_r2045825185
PR Review Comment: https://git.openjdk.org/valhalla/pull/1432#discussion_r2045823752


More information about the valhalla-dev mailing list