<html xmlns:v="urn:schemas-microsoft-com:vml" 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=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Roboto;
        panose-1:2 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="en-CZ" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Oops, I missed the other thread about keeping the original order of handlers, so I’m taking the idea of synchronous streaming of ExceptionCatch back.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Adam<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">classfile-api-dev <classfile-api-dev-retn@openjdk.org> on behalf of Adam Sotona <adam.sotona@oracle.com><br>
<b>Date: </b>Thursday, 25 August 2022 8:18<br>
<b>To: </b>Paul Sandoz <paul.sandoz@oracle.com><br>
<b>Cc: </b>classfile-api-dev@openjdk.org <classfile-api-dev@openjdk.org><br>
<b>Subject: </b>Re: Classfile API Synchronous Stack Tracking in CodeBuilder<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Yes, it should be documented.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><s><span style="font-size:11.0pt">Or maybe we can consider removal of handler label from ExceptionCatch and stream and collect it synchronously at the handler start position. Practically it defines handler block start, where try start and
 try end labels are just additional information.<o:p></o:p></span></s></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">StackTracker is actually not verifying content nor merging stack at   branch targets, however it indicates lost track by returning empty Optional. Handler block start usually follows "no-flow" instruction
 (goto, return, athrow...) - and it represents a (temporary) dead code (as the handler has not been yet declared), so the stack tracking is lost and stack method indicates failure by returning empty Optional.<br>
<br>
<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Roboto">Thanks,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Roboto">Adam<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:11.0pt">
<hr size="2" width="459" style="width:343.95pt" align="center">
</span></div>
<div>
<p class="MsoNormal"><b><span style="font-size:11.0pt;color:black">From:</span></b><span style="font-size:11.0pt;color:black"> Paul Sandoz <paul.sandoz@oracle.com></span><span style="font-size:11.0pt;font-family:Roboto"><o:p></o:p></span></p>
</div>
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt">Requiring ExceptionCatch (and ExceptionCatchAll, not suppported) be reported before the target label is bound is awkward, but it's clear why. I think that would require documentation,
 and perhaps it should fail since it will otherwise report incorrect stack data?<br>
<br>
<br>
<o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>