<div dir="ltr">Really, that's how it's supposed to work.<br>Then I learned something new today.<br><br>Thank you !<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 26, 2024 at 5:17 PM Maurizio Cimadamore <<a href="mailto:maurizio.cimadamore@oracle.com">maurizio.cimadamore@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I think this is as expected? E.g. by default the classfile API will <br>
consider all jumps to be "short jumps" (e.g. "goto" instead of "goto_w").<br>
<br>
If that fails (e.g. because the code is too big), code generation is <br>
"replayed", this time using "long jumps" (e.g. "goto_w" instead of "goto").<br>
<br>
This is why you see the consumer being called twice.<br>
<br>
Maurizio<br>
<br>
On 26/07/2024 10:35, Øystein Myhre Andersen wrote:<br>
> The attached code contains the building of a class with one method '_STM'.<br>
> When the method gets too big, more than 32,767 bytes, a weird <br>
> situation occurs.<br>
><br>
> Look at lines 93-94: Here the size of the code can be changed.<br>
> When the code is greater than 32,767  (caseBlockSize = 13000)<br>
> the Method 'buildMethod_STM' is called twice with different <br>
> CodeBuilders !!!<br>
><br>
> When caseBlockSize = 10000 everything is OK.<br>
><br>
> There must be something wrong here.<br>
><br>
> - Øystein Myhre Andersen<br>
</blockquote></div>