<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;}
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="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt"><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">Dan Smith <daniel.smith@oracle.com><br>
<b>Date: </b>Wednesday, June 5, 2024 at 1:42</span><span style="font-family:"Arial",sans-serif;color:black"> </span><span style="color:black">PM<br>
<b>To: </b>Dan Heidinga <dan.heidinga@oracle.com><br>
<b>Cc: </b>valhalla-spec-experts <valhalla-spec-experts@openjdk.java.net><br>
<b>Subject: </b>Re: 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">> On Jun 5, 2024, at 9:21</span><span style="font-size:11.0pt;font-family:"Arial",sans-serif"> </span><span style="font-size:11.0pt">AM, Dan Heidinga <dan.heidinga@oracle.com> wrote:<br>
> <br>
> Thanks for making the update from Preload to LoadableDescriptors. It cleans up the spec a lot.<br>
> <br>
> 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.<br>
<br>
Not the intent—I did leave in these rephrasings that, on review, didn't look like they were weighing in on this issue.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">I would prefer to revert these additions as it introduces an ambiguity into spec – some loading may be driven by resolution while the new sentence implies additional unstated reasons
classes may be loaded from the constant pool.<o:p></o:p></span></p>
<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"><br>
> 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.<br>
<br>
The clarification I wanted to make, in particular, is that verification can lead to loading, independently from resolution.<br>
<br>
Would it help to say "the **specified** loading of other classes and interfaces"?<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">Class loading due to verification is already covered in 5.4.1 where it the spec says: “Verification may cause additional classes and interfaces to be loaded…”. There is a state
machine in class loading that goes from loaded > verified > prepared > initialized. Linking is a longer stage that spans from verified to unloaded as linking can continue throughout execution when using a lazy strategy. Since linking includes verification
and preparation I don’t think we need additional clarification in 5.4 as 5.4.1 covers it already.<o:p></o:p></span></p>
<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"><br>
> I think this change should also be reverted: “, (and, because of recursion, loading) including the loading of other classes,” as it broadens the loading behaviour beyond what the original struck thru clause meant.<br>
<br>
I just thought the "because of recursion" felt very tailored to constant resolution, again ignoring verification-time loading.<br>
<br>
Given the previous sentence, I'd actually be happy to just delete this aside about loading entirely. This paragraph and bulleted list really doesn't need to be concerned with loading (of other classes) at all.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">Deleting both the original “because of recursion” and the new “including the loading of other classes” text works for me.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">--Dan<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>