<div dir="ltr"><div>Below some minor comments based on my experience from last summer.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Di., 7. März 2023 um 15:40 Uhr schrieb Adam Sotona <<a href="mailto:adam.sotona@oracle.com">adam.sotona@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"><div class="msg4217746219005015701">
<div lang="en-CZ" style="overflow-wrap: break-word;">
<div class="m_-5496969929899167579WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Some of the proposed RFEs fall beyond the initial Classfile API pull request and we should probably start filling them to JBS or find another way to track them.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Here are listed citations (for temporary tracking purpose) what I’ve collected from the feedback:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<ol style="margin-top:0cm" start="1" type="1">
<li class="m_-5496969929899167579MsoListParagraph" style="margin-left:2.25pt"><code><span style="font-size:9pt;font-family:Menlo;color:rgb(36,41,47)">switch</span></code><span class="m_-5496969929899167579apple-converted-space"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:rgb(36,41,47);background:white"> </span></span><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:rgb(36,41,47);background:white">seems
the one instruction for which an high-level variant (like<span class="m_-5496969929899167579apple-converted-space"> </span></span><code><span style="font-size:9pt;font-family:Menlo;color:rgb(36,41,47)">trying</span></code><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:rgb(36,41,47);background:white">)
could be useful, as generating code for that can be quite painful.</span></li></ol></div></div></div></blockquote><div><br></div><div>I'm not a user of trying and I probably would not use switch as well, but a method wrapping</div><div>tableSwitchInstruction() and lookupSwitchInstruction() would be useful to me. As Brian pointed<br></div><div>out, one is optimizing for byte code size when choosing between the two. Being effectively</div><div>isolated from byte codes and their size by the Classfile API, I would appreciate if there was a</div><div>way to delegate this decision to the API.</div><div><br></div><div>(This is not a vote against a trying-like higher level switch variant. My last major code</div><div>generation bug was the bytecode equivalent of omitting the breaks from a switch, i.e. forgetting</div><div>the GOTO at the end of paths that did not end with a RETURN.)</div><div><br></div><div>In a similar vein and along the lines of constantInstruction(), a method moving newarray(),</div><div>anewarray(), and multianewarray() under a single umbrella would be helpful. </div><div><br></div><div>Oh, and constantInstruction() properly handling -0.0d and -0.0f would be nice. This is the</div><div>one patch I have been carrying around since the very beginning that has not been resolved.</div><div><br></div><div>-- mva</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg4217746219005015701"><div lang="en-CZ" style="overflow-wrap: break-word;"><div class="m_-5496969929899167579WordSection1">
</div>
</div>
</div></blockquote></div></div>