RFR(XS) : JDK-8008687 - MethodHandle code: allow static and invokespecial calls to interface methods

Bharadwaj Yadavalli bharadwaj.yadavalli at oracle.com
Mon Apr 22 19:48:08 PDT 2013


Thanks for your quick review, John.

On 4/22/2013 2:06 PM, John Rose wrote:
> On Apr 19, 2013, at 9:41 AM, Bharadwaj Yadavalli <bharadwaj.yadavalli at oracle.com> wrote:
>
>> I would like to request for a review of code changes made to support lambda related modifications to allow static and invokespecial calls to interface methods per spec version 0.6.2 (http://cr.openjdk.java.net/~dlsmith/jsr335-0.6.2.html). These changes support an upcoming change that compiles lambdas as private static methods in conjunction with hotspot changes pushed to address JDK-8006267.
>>
>> JBS        : https://jbs.oracle.com/bugs/browse/JDK-8008687
>> Webrev : http://cr.openjdk.java.net/~bharadwaj/8008687/webrev/
> Looks good as far as it goes (to allow private lambda bodies to be accessed from interfaces).  But more work is needed to align the java.lang.invoke APIs with the new class file rules.
>
> In your code, I think the case 'refKind == REF_invokeSpecial' is missing.

I see lambda test failures when I add add that check. I am not yet sure 
what is causing these failure. I will look into them.

>   The draft JVMS implies REF_invokeSpecial is also allowed, since an interface method can be any of {public,private}+{static,non-static}.  We should have unit tests for findStatic and findSpecial of interface methods.  (Also unreflect and unreflectSpecial.)
>
> But it is a step forward.  You can count me as a reviewer.  Please consider filing a followup bug to support the other new interface method kinds.

OK. I'll file the bug to track the necessary support.

Thanks,

Bharadwaj



More information about the hotspot-runtime-dev mailing list