JVMS changes for JEP 401

Dan Smith daniel.smith at oracle.com
Wed Jan 24 01:11:18 UTC 2024


I've posted a revised spec change document for JEP 401, Value Classes and Objects, here:

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

Not covered by JVMS is anything to do with our internal-only null restriction annotations, or (naturally) anything about scalarization/flattening. Of course those things represent a large chunk of the code changes that we anticipate delivering with JEP 401.

We've already identified a few issues from internal reviews, which I'll address in a followup iteration:

- 5.3.5 needs to allow JVM implementations to "speculatively" load classes mentioned by Preload, enabling early field layout computations ("speculative" because the attempt may fail due to circularities, but succeed later)

- The categorization of attributes in 4.7 is not a great fit for Preload; maybe we need to redefine the categories a bit

- The definition of the Preload attribute could use more (perhaps non-normative) description of how it works, even though this is mostly below the level of the spec; 5.4 could also help clarify this

- The reference to the "start of object construction" in the table about ACC_STRICT is vague; maybe we can do better

- The 4.9.2 rule about ACC_STRICT is hard to parse, will be rephrased somehow

- 2.4 should say more about "sameness" as it relates to "identity"


More information about the valhalla-spec-observers mailing list