RFR: Lambda: 8028438: Static superclass masking default method

Karen Kinnear karen.kinnear at oracle.com
Tue Dec 3 10:37:18 PST 2013


Coleen,

Thank you for the review - and for the verbal letting me check this in as is/as tested given the timing of the release.

thanks,
Karen

On Dec 2, 2013, at 7:47 PM, Coleen Phillimore wrote:

> 
> Hi Karen,
> 
> Instead of this:
> 
>       Method* mo = InstanceKlass::cast(super)->lookup_method(name, signature);
> +      while (mo != NULL && mo->access_flags().is_static()
> +             && mo->method_holder() != NULL
> +             && mo->method_holder()->super() != NULL)
> +      {
> +         mo = mo->method_holder()->super()->uncached_lookup_method(name, signature);
> +      }
> 
> 
> Instead can you add a version of uncached_lookup_method that doesn't return a static method?   I think it would make LinkResolver::lookup_instance_method_in_klasses() be cleaner too. And eliminate my confusion in n-1 review.
> 
> I think without this change, you would add itable entries for static methods in java.lang.Object like registerNatives and now you don't. I don't think that's a bad thing and can't think of a way for it to cause an incompatibility.
> 
> thanks,
> Coleen
> 
> On 12/01/2013 12:33 PM, Karen Kinnear wrote:
>> Please review:
>> 
>> webrev: http://cr.openjdk.java.net/~acorn/8028438/webrev/
>> bug: https://bugs.openjdk.java.net/browse/JDK-8028438
>> 
>> Summary: default method resolution needs to follow selection rules in which static methods
>> are skipped, so they don't mask default methods.
>> 
>> Tests run:
>> Test in bug report - which was added to the defmeth tests - separate review
>> jck.lang, jck.vm
>> jtreg java.util, java.lang, lambda
>> jtreg langtools/test/lambdaShapes/.../test/vm
>> 2009 invoke* tests
>> hotspot jtreg: runtime, compiler
>> nsk vm.quick, vm.mlvm
>> 
>> thanks,
>> Karen
> 



More information about the hotspot-runtime-dev mailing list