groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <>
Subject Re: About the native-lambda branch
Date Sun, 14 Jan 2018 10:47:50 GMT
On 14.01.2018 01:10, Daniel Sun wrote:
> Hi Jochen,
>> What I wish for in a static compile lambda is the following:
>> * bar is a parameter to the method generated for the lambda
> I am trying to make native lambda support sharing local variables, but ASM
> reports the following error[1]:
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
> 	at org.objectweb.asm.Frame.merge(
> Have you ever encountered similar problems? Looking forward to your
> suggestions :-)

most likely two frames with a differing number of operand stack 
elements. Like

aload 0
ifnonnull goto Y

first we load this, then we double it. the conditional jump will remove 
one. So once we arrive in y we would have one element on the stack, if 
the condition does not apply we go to X, then we have two elements on 
the operand stack and once we arrive in Y we still do.

bye jochen

View raw message