RFR (S) Remove SystemDictionary::InitOption enum
    David Holmes 
    david.holmes at oracle.com
       
    Fri Oct 19 01:14:57 UTC 2018
    
    
  
Hi Ioi,
Please include the bug number in RFR subject - thanks.
On 19/10/2018 2:25 AM, Ioi Lam wrote:
> https://bugs.openjdk.java.net/browse/JDK-8212642
> http://cr.openjdk.java.net/~iklam/jdk12/8212642-remove-sysdict-initoption.v01/ 
> 
> 
> SystemDictionary::InitOption is no longer needed because we don't support
> multiple version of the JDK class libraries anymore. All classes preloaded
> by SystemDictionary must exist.
In systemDictionary.cpp/hpp:
1974 bool SystemDictionary::resolve_wk_klass(WKID id, int init_opt, TRAPS) {
The init_opt parameter is now unused.
---
src/hotspot/share/classfile/systemDictionary.hpp
  96 // Each well-known class has a short klass name (like object_klass),
  97 // a vmSymbol name (like java_lang_Object), and a flag word
  98 // that makes some minor distinctions, like whether the klass
  99 // is preloaded, optional, release-specific, etc.
The comment is no longer accurate/correct.
---
src/hotspot/share/runtime/reflection.cpp
Why is MagicAccessorImpl still treated as optional?
> The JVMCI classes were declared using InitOption::Jvmci, so that they 
> are loaded
> only when EnableJVMCI==true. However, this is rather convoluted and
> I just added a few null checks instead.
Can't help but think check_klass is redundant now. It would simplify 
things if it were removed, then you wouldn't need to check is_loaded. 
The only reason for the check is to avoid the NULL-check in the 
assertion in check_klass when called from name(). The JVMCI code either 
has to handle the NULL anyway, or else is never called unless it can't 
be NULL.
Thanks,
David
> Tested using hs tiers 1-5
> 
> Thanks
> - Ioi
    
    
More information about the hotspot-dev
mailing list