Accessing runtime directly in LibraryCallKit without going through ci

Krystal Mok rednaxelafx at gmail.com
Thu Jul 3 23:04:53 UTC 2014


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/20140703/bc66f5ed/attachment.html>


More information about the hotspot-compiler-dev mailing list