<div dir="ltr">Hi Dan,<div>Thanks for sharing this document! It looks great!</div><div>There's a typo in section 2.4, where the definition of "element type" for an array type is accidentally removed.</div><div><br></div><div>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]<br></div><div>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.</div><div><br></div><div>[1] <a href="https://cr.openjdk.org/~jrose/jls/constructive-classes.html" target="_blank">https://cr.openjdk.org/~jrose/jls/constructive-classes.html</a></div><div><br></div><div>Chen</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 23, 2024 at 7:11 PM Dan Smith <<a href="mailto:daniel.smith@oracle.com" target="_blank">daniel.smith@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I've posted a revised spec change document for JEP 401, Value Classes and Objects, here:<br>
<br>
<a href="https://cr.openjdk.org/~dlsmith/jep401/jep401-20240116/specs/value-objects-jvms.html" rel="noreferrer" target="_blank">https://cr.openjdk.org/~dlsmith/jep401/jep401-20240116/specs/value-objects-jvms.html</a><br>
<br>
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.<br>
<br>
We've already identified a few issues from internal reviews, which I'll address in a followup iteration:<br>
<br>
- 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)<br>
<br>
- The categorization of attributes in 4.7 is not a great fit for Preload; maybe we need to redefine the categories a bit<br>
<br>
- 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<br>
<br>
- The reference to the "start of object construction" in the table about ACC_STRICT is vague; maybe we can do better<br>
<br>
- The 4.9.2 rule about ACC_STRICT is hard to parse, will be rephrased somehow<br>
<br>
- 2.4 should say more about "sameness" as it relates to "identity"</blockquote></div>