JVMS changes for JEP 401

- liangchenblue at gmail.com
Wed Jan 24 02:12:30 UTC 2024


Hi Dan,
Thanks for sharing this document! It looks great!
There's a typo in section 2.4, where the definition of "element type" for
an array type is accidentally removed.

The reference to the "start of object construction" can probably be
changed to "before the super-call," taken from John's "Constructive
Classes" essay. [1]
The 4.9.2 rule is correct; perhaps we can be more explicit, that such a
putfield can only exist in an <init> that calls a direct superclass's
<init>, and the putfield must exist before such a super-call.

[1] https://cr.openjdk.org/~jrose/jls/constructive-classes.html

Chen

On Tue, Jan 23, 2024 at 7:11 PM Dan Smith <daniel.smith at oracle.com> wrote:

> 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"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-spec-observers/attachments/20240123/d9716ea0/attachment.htm>


More information about the valhalla-spec-observers mailing list