<div dir="ltr"><div>Hi,</div><div><br></div><div>regarding the "implements NonAtomic" approach, what about the corner case where a class implementing NonAtomic contains a field of a second value type not implementing NonAtomic? Special measurements in the JVM will be necessary to guarantee the intention of the second value type's author.<br></div><div><br></div><div>Best regards</div><div>Arne Siegel<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Mi., 3. Mai 2023 um 04:06 Uhr schrieb Dan Smith <<a href="mailto:daniel.smith@oracle.com">daniel.smith@oracle.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">JEP 401 has been updated to reflect our most recent discussions about deriving flattening from nullness and value class properties. Now calling this feature "Flattened Heap Layouts for Value Objects".<br>
<br>
<a href="https://openjdk.org/jeps/401" rel="noreferrer" target="_blank">https://openjdk.org/jeps/401</a><br>
<br>
I've also put together a revised JVMS document to specify the needed JVM attributes.<br>
<br>
<a href="https://cr.openjdk.org/~dlsmith/jep401/jep401-20230428/specs/flattened-heap-jvms.html" rel="noreferrer" target="_blank">https://cr.openjdk.org/~dlsmith/jep401/jep401-20230428/specs/flattened-heap-jvms.html</a><br>
<br>
This approach to the JVM avoids any use of 'Q' types in class files, which we decided had too much overhead for our limited needs.<br>
<br>
At this stage, there's no JVMS feature to support flattened array creation. Instead, these are created by passing Class objects representing null-restricted types to the 'Array.newInstance' methods.<br>
<br>
</blockquote></div>