Accessing runtime directly in LibraryCallKit without going through ci

Krystal Mok rednaxelafx at gmail.com
Tue Jul 8 20:00:20 UTC 2014


Hi guys,

Any comments on this part?

Thanks,
Kris


On Thu, Jul 3, 2014 at 4:04 PM, Krystal Mok <rednaxelafx at gmail.com> wrote:

> Hi everyone,
>
> I just came across this piece of code in C2 LibraryCallKit:
>
>
> http://hg.openjdk.java.net/jdk9/jdk9/hotspot/file/39bac689e998/src/share/vm/opto/library_call.cpp#l435
>
> 433:  case vmIntrinsics::_getCallerClass:
> 434:     if (!InlineReflectionGetCallerClass)  return NULL;
> 435:     if (SystemDictionary::reflect_CallerSensitive_klass() == NULL)
>  return NULL;
> 436:     break;
>
> Line 435 is accessing the runtime (SystemDictionary) directly without
> going through ci.
> Apparently it runs "okay" in current HotSpot. But as a convention, should
> it be changed to go through ci? i.e.
>
> if (C->env()->reflect_CallerSensitive_klass() == NULL)  return NULL;
>
> Thanks,
> Kris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20140708/a43f5cfb/attachment.html>


More information about the hotspot-compiler-dev mailing list