<div dir="ltr"><div>[Mail delivery is flaky today. Trying again...]</div><div><br></div><div dir="ltr">Am Do., 18. Aug. 2022 um 17:41 Uhr schrieb Adam Sotona <<a href="mailto:adam.sotona@oracle.com">adam.sotona@oracle.com</a>>:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg570181850106594974">
<div lang="en-CZ" style="overflow-wrap: break-word;">
<div class="gmail-m_570181850106594974WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">I have another Classfile API change proposal to discuss.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">Method labelToBci from impl.LabelResolver is exposed through CodeModel.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">I propose to completely remove impl.LabelResolver and move the label resolution functionality to CodeAttribute::labelToBci.
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">CodeAttribute is the only API subclass of CodeModel where the bytecode index can be successfully resolved and where it makes sense to use it together with CodeAttribute::codeArray.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">Also CodeBuilder exposes method labelToBci, even it does not subclass LabelResolver.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11pt">I propose to remove CodeBuilder::labelToBci as it is just another exposure of internal functionality and should not serve to users.<br></span></p></div></div></div></blockquote><div><br></div><div>I have a single use of CodeBuilder.labelToBci(): decide whether the labels marking</div>the start and end of a try block refer to the same position, as a proxy for "enclosed<br>region is empty". If this is the case, then no exceptionCatch can be installed and <br>all exception handlers become unreachable.<br><br>How can this scenario still be supported?<br><br>-- mva<br></div><div class="gmail_quote"><br></div></div>