RFR soon: Lambda: 8011311: support for private interface methods

Karen Kinnear karen.kinnear at oracle.com
Mon Sep 30 20:46:46 PDT 2013


Bharadwaj,

Thank you very much for the review.
Yes, if we have already set *has_default_methods to true, we don't need to do the
rest of the calculation, so yes I made your suggested change.

I very very much appreciate you fitting this in today with so little notice,
many thanks,
Karen

On Sep 30, 2013, at 11:18 PM, Bharadwaj Yadavalli wrote:

> 
> Karen,
> 
> Changes look good to me.
> 
> Just a nit - Could the testing and setting of *has_default_methods be further optimized as follows?
> 
> --- a/src/share/vm/classfile/classFileParser.cpp    Fri Sep 27 10:08:56 2013 -0400
> +++ b/src/share/vm/classfile/classFileParser.cpp    Mon Sep 30 19:30:34 2013 -0700
> @@ -2545,7 +2545,9 @@
>       if (method->is_final()) {
>         *has_final_method = true;
>       }
> -      if (is_interface && !method->is_abstract() && !method->is_static()) {
> +      if (is_interface && !(*has_default_methods)
> +          && !method->is_abstract() && !method->is_static()
> +          && !method->is_private()) {
>         // default method
>         *has_default_methods = true;
>       }
> 
> Thanks,
> 
> Bharadwaj
> 
> On 9/27/2013 8:36 PM, Karen Kinnear wrote:
>> 
>> Please review soon - the goal is to check this in Monday or Tuesday.
>> 
>> http://cr.openjdk.java.net/~acorn/8011311.8014013.01/webrev/ <http://cr.openjdk.java.net/%7Eacorn/8011311.8014013.01/webrev/>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8011311
>> 
>> Based on JVMS update for default method support for lambda, version 0.6.3 and bug JDK-8025604:
>> http://cr.openjdk.java.net/~dlsmith/jsr335-0.6.3/ <http://cr.openjdk.java.net/%7Edlsmith/jsr335-0.6.3/>
>> Part J: Java Virtual Machine
>> 
>> Summary of changes
>> 1. added private interface method support
>>   - which can only be invoked via invokespecial directly on the interface method reference containing the private method
>> 2. invokevirtual and invokeinterface throw IncompatibleclassChangeError if they attempt to reference a private interface method
>> 3. conflicting default methods throw ICCE rather than AbstractMethodError
>> 4. invokespecial superinterface.method no longer performs additional check for shadowing of superinterfaces
>> 5. added some debug tracing
>> 
>> 
>> Note: vmsqe defmeth tests: PrivateMethodsTest updated to cover these cases.
>> 
>> Testing: with JDK-8012557 to actually generate internal private interface methods (javac won't generate them)
>> 1. specific test for 8011311
>> 2. defmeth PrivateMethodsTest
>> 3. reflection invocation test
>> (16th and subsequent reflection success depends on an upcoming change to the jdk repository)
>> 4. internal TypeTest.java - in conjunction with JDK-8012557 changes
>> 5. 8025475 sample test - depends on upcoming javac/metafactory changes in JDK-8012557
>> 6. 8014013 intfbug
>> 7. invokespecial, invokevirtual, invokeinterface tests (filed bug for recently broken issue: JDK-8025592)
>> 8. lambda DefaultMethodsTest - 3 tests need updating for AME->ICCE spec change
>> 9. jtreg java.util, java.lang
>> 10. jck lang
>> 11. jck vm:
>>   need to file a new JCK bug for 8 tests which need to change due to spec update, resolveIntMethod, resolveMethod in vm.constantpool
>>   for private and static methods in interfaces, relative to spec bug JDK-8025604
>> 12. vm.quick.testlist
>> 13. vm.mlvm.testlist
>> 14. jprt in progress
>> 
>> thanks,
>> Karen
>> 
> 



More information about the hotspot-runtime-dev mailing list