Updated specs for Value Classes

Dan Smith daniel.smith at oracle.com
Fri Sep 26 22:57:53 UTC 2025


Please see these spec change documents, revised to align with current plans for the Value Classes and Objects JEP.

https://cr.openjdk.org/~dlsmith/jep401/jep401-20250926/specs/value-objects-jls.html
https://cr.openjdk.org/~dlsmith/jep401/jep401-20250926/specs/value-objects-jvms.html

I've also revised the JEP in the last couple of months, which you can view here:

https://openjdk.org/jeps/401

Some highlights:

- Clarified the presentation of how == works, with extensive discussion in the JEP
- Instance fields can be both written and read in early construction
- Record classes adopt the same early construction behavior as value classes
- Memory model rules to ensure correct values are read from value and record class fields (and, eventually, other strict fields)
- New verifier rules disallowing acmp/ifnull on uninitialized types

A linked JVMS document covers the Strict Field Initialization JEP, although I still have some work to do to refresh and polish that one.



More information about the valhalla-spec-experts mailing list