New bigger bytecode for small lambda in b79

Eric Caspole eric.caspole at amd.com
Mon Mar 11 07:20:15 PDT 2013


Hi Maurizio,
Is there a bug number for this issue?

If need be, and I can do it as a non-Oracle person, just send me a link 
to the bug db.
Thanks,
Eric


On 02/27/2013 02:08 PM, Maurizio Cimadamore wrote:
> I don't think this is lambda specific - probably related to this:
>
> http://hg.openjdk.java.net/jdk8/tl/langtools/rev/017e8bdd440f
>
> Will dig further.
> Thanks for the report.
>
> Maurizio
>
> On 27/02/13 18:57, Eric Caspole wrote:
>> Hi Lambda people,
>> I am not sure if this is lambda specific or not, but this is what we
>> found. For a small test case like this:
>>
>> 	  java.util.stream.Streams.intRange(FROM, SIZ,
>> STEP).parallel().forEach(p -> {ary[p]+= inc;});
>>
>> The bytecode of the lambda is different this week. It all works but we
>> were wondering why it is so much bigger. This new bytecode also happens
>> in the lambda-8-b79-linux-x64-25_feb_2013.tar.gz snapshot.
>>
>> Regards,
>> Eric
>>
>>
>> Old bytecode of lambda from last week:
>>
>>     private void lambda$0(int, int);
>>       flags: ACC_PRIVATE, ACC_SYNTHETIC
>>       Code:
>>         stack=4, locals=3, args_size=3
>>            0: aload_0
>>            1: getfield      #3                  // Field ary:[I
>>            4: iload_2
>>            5: dup2
>>            6: iaload
>>            7: iload_1
>>            8: iadd
>>            9: iastore
>>           10: return
>>         LineNumberTable:
>>           line 57: 0
>>
>>
>> New bytecode generated since about Friday:
>>
>>     private void lambda$0(int, int);
>>       flags: ACC_PRIVATE, ACC_SYNTHETIC
>>       Code:
>>         stack=4, locals=4, args_size=3
>>            0: aload_0
>>            1: getfield      #3                  // Field ary:[I
>>            4: astore_3
>>            5: aload_3
>>            6: iload_2
>>            7: aload_3
>>            8: iload_2
>>            9: iaload
>>           10: iload_1
>>           11: iadd
>>           12: dup_x2
>>           13: iastore
>>           14: pop
>>           15: return
>>         LineNumberTable:
>>           line 57: 0
>>
>>
>



More information about the lambda-dev mailing list