[8] RFR (XS): 8036100: Default method returns true for a while, and then returns false
Vladimir Kozlov
vladimir.kozlov at oracle.com
Mon Mar 3 15:49:03 PST 2014
Looks good.
Thanks,
Vladimir
On 3/3/14 3:24 PM, Vladimir Ivanov wrote:
> http://cr.openjdk.java.net/~vlivanov/8036100/webrev.01/
> https://bugs.openjdk.java.net/browse/JDK-8036100
>
> CHA still doesn't handle default methods right.
>
> For the following hierarchy and C1 as a context:
> interface I1 { default m() {} }
> interface I2 extends I1 { default m() {} }
>
> class C1 implements I1 {}
> class C2 extends C1 implements I2 {}
>
> CHA reports I1.m as a unique method. However C2.m resolves to I2.m.
>
> The fix for 8 is to disable CHA for default methods.
> Proper fix will go into 8u and 9.
>
> It is enough to add the check on root_m, because root_m should be
> non-abstract (see ciMethod::resolve_invoke). So, it's either (1) a
> default or (2) an instance method. (1) is covered by the fix and (2)
> isn't affected by default methods, because concrete method always hides
> all default methods in the hierarchy.
>
> Testing: regression test, vm.quick.testlist, vm.adhoc test set
>
> Best regards,
> Vladimir Ivanov
More information about the hotspot-compiler-dev
mailing list