On 4/22/2013 2:06 PM, John Rose wrote:
On Apr 19, 2013, at 9:41 AM, Bharadwaj Yadavalli 
<bharadwaj.yadava...@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.
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. The 
draft JVMS implies REF_invokeSpecial is also allowed, since an interface method 
can be any of {public,private}+{static,non-static}.

Thanks for pointing it out. I modified the assertion in referenceKindIsConsistent() to allow REF_invokeSpecial to reference interface method. I have uploaded the modified webrev. Please review.

JBS : https://jbs.oracle.com/bugs/browse/JDK-8008687
Original Webrev : http://cr.openjdk.java.net/~bharadwaj/8008687/webrev_0/
Modified Webrev : http://cr.openjdk.java.net/~bharadwaj/8008687/webrev_1/

Reran lambda tests successfully.

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.

I have filed a new JBS issue.

Thanks again.

Bharadwaj

Reply via email to