Request for review (M): 7171890: C1: add Class.isInstance intrinsic

John Rose john.r.rose at oracle.com
Thu May 31 00:10:17 PDT 2012


On May 30, 2012, at 7:55 PM, Krystal Mok wrote:

> Yes, it's doable. I'll just take the same approach for clazz1.isAssignableFrom(clazz2).

It's trickier, since you can't just repurpose the C1 InstanceOf node.  It looks like you'll have to refactor machine-dependent code to cut in the new logic.

For a comparison, see inline_native_subtype_check in C2, versus the "_isInstance" cases of inline_native_Class_query.  The intrinsic for Class.isAssignableFrom is surprisingly more complex and specialized than the intrinsic for Class.isInstance.

(For C2-ish reasons, the intrinsic logic in library_call.cpp is machine-independent, so it's easier to do than in C1.)

Unless you find a simple way to manage the C1 changes, you might want to stick with isInstance only, this time around.

In any case, we'll try what you have done already; I am confident it will do good things for our dynamic language codes.

Thanks,
— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20120531/2567dec0/attachment.html 


More information about the hotspot-compiler-dev mailing list