<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-CA" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks for making the update from Preload to LoadableDescriptors. It cleans up the spec a lot.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I have concerns about the changes to 5.4 related to loading classes. As discussed at the offsite meeting, from an implementation perspective, we don’t want to introduce new rules that allow loading of arbitrary
classes at any point during linking. There are already rules in place about further execution being driven by the invocation of the main method (JVMS 5.2) and the linking activities driven by its execution. Introducing new rules that legitimize other loading
strategies are outside the remit of Valhalla and are unnecessary for our purposes.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The original 5.4 states “Linking also involves resolution of symbolic references in the class or interface, though not necessarily at the same time as the class or interface is verified and prepared.” which
already allows for loading of necessary classes. The new sentence “All of these linking activities may involve the loading of other classes and interfaces mentioned in the constant pool of the current class or interface.” unnecessary widens what and when
loading can occur and opens doors I don’t think we need or want opened.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I think this change should also be reverted: “, (<s>and, because of recursion, loading)
</s>including the loading of other classes,” as it broadens the loading behaviour beyond what the original struck thru clause meant.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">The new clause:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:36.0pt"><span style="font-size:11.0pt">><u>If a class being linked has a </u>LoadableDescriptors<u> attribute (</u><a href="https://cr.openjdk.org/~dlsmith/jep401/jep401-20240603/specs/value-objects-jvms.html#jvms-4.7.32">4.7.32</a><u>),
then during any phase of linking, a Java Virtual Machine implementation may optionally load any of the classes or interfaces mentioned by the entries of the </u>descriptors<u> array of the </u>LoadableDescriptors<u> attribute. Any exception that is thrown
as a result of failure to load the class or interface must be ignored and discarded.</u><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">sufficiently covers the behaviour we want to add in Valhalla.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--Dan<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
<b><span style="color:black">From: </span></b><span style="color:black">valhalla-spec-experts <valhalla-spec-experts-retn@openjdk.org> on behalf of Dan Smith <daniel.smith@oracle.com><br>
<b>Date: </b>Monday, June 3, 2024 at 3:00</span><span style="font-family:"Arial",sans-serif;color:black"> </span><span style="color:black">PM<br>
<b>To: </b>valhalla-spec-experts <valhalla-spec-experts@openjdk.java.net><br>
<b>Subject: </b>Updated specifications<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:36.0pt">
<span style="font-size:11.0pt">I've posted updated specifications for JEP 401 here:<br>
<br>
<a href="https://cr.openjdk.org/~dlsmith/jep401/jep401-20240603/specs/value-objects-jls.html">https://cr.openjdk.org/~dlsmith/jep401/jep401-20240603/specs/value-objects-jls.html</a><br>
<a href="https://cr.openjdk.org/~dlsmith/jep401/jep401-20240603/specs/value-objects-jvms.html">https://cr.openjdk.org/~dlsmith/jep401/jep401-20240603/specs/value-objects-jvms.html</a><br>
<br>
These are intended to address all the needs of JEP 401, and I don't expect many further revisions—but as always, happy to hear any feedback.<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>