RFR(S): 8225317: [lworld] Fix Class::asPrimaryType and isAssignableFrom C2 intrinsics after JDK-8223351

Mandy Chung mandy.chung at oracle.com
Mon Jun 17 16:08:10 UTC 2019


Hi Tobias,

FYI.  I updated the JDK [1] to follow up this fix to use asPrimaryType 
dropping the conditional check of inline class. Testing result is good.

Thanks for the fix.

Mandy
[1] http://hg.openjdk.java.net/valhalla/valhalla/rev/27aa3a3f9726

On 6/13/19 6:00 AM, Tobias Hartmann wrote:
> Hi,
>
> please review the following fix:
> https://bugs.openjdk.java.net/browse/JDK-8225317
> http://cr.openjdk.java.net/~thartmann/8225317/webrev.00/
>
> Changes:
> - The asPrimaryType and asIndirectType intrinsics should return 'this' if the receiver is not a
> value type mirror.
> - The isAssignableFrom intrinsic incorrectly returns true for
> MyValue1.class.isAssignableFrom(MyValue1.class.asIndirectType()). The problem is that the subtype
> check passes because MyValue and MyValue? have the same klass. We need to additionally check if the
> mirrors are equal if the supertype mirror is a "primary type".
> - I've also refactored the value mirror check into an own method (at some point we need to rename
> "value class" to "inline class" but that's out of the scope of this patch).
>
> Thanks,
> Tobias



More information about the valhalla-dev mailing list