<div dir="ltr">A couple of questions about the spec for the Preload attribute[0].  The current spec says it indicates "certain classes contain information that may be of interest during linkage."<div><br></div><div>The Preload attribute removes one need for Q modifiers while allowing calling convention optimizations and layout decisions to be made early.</div><div><br></div><div>The current spec is quite vague on what classes should be included in the attribute and on when / what the VM will do with those classes (or even if it does anything).  I think it's time to tighten up the spec for Preload attribute and specify:</div><div>* what the VM will do with classes listed in the attribute</div><div>* when those classes will be loaded (ie: somewhere in JVMS 5.3)</div><div>* how invalid cases are handled, including circularities (Class A's Preload mentions B <: A)</div><div>* what types of classes can be listed (any? only values?)</div><div><br></div><div>And there's probably other issues to clarify.  Otherwise, the current spec isn't clear enough for users to know when to add a class, how it will be treated, and any potential edge cases to avoid.</div><div><br></div><div>It probably makes sense to start from the current Hotspot handling of the attribute and fine tune that into the spec?</div><div><br></div><div>--Dan<br><div><br></div><div>[0] <a href="https://cr.openjdk.org/~dlsmith/jep401/jep401-20230404/specs/value-objects-jvms.html#jvms-4.7.31">https://cr.openjdk.org/~dlsmith/jep401/jep401-20230404/specs/value-objects-jvms.html#jvms-4.7.31</a></div></div></div>