src/hotspot/share/ci/ciInstanceKlass.cpp
changeset 52907 7cc17c043ce0
parent 52784 621efe32eb0b
child 52925 9c18c9d839d3
equal deleted inserted replaced
52906:06fd6cb23acd 52907:7cc17c043ce0
    70   // Ensure that the metadata wrapped by the ciMetadata is kept alive by GC.
    70   // Ensure that the metadata wrapped by the ciMetadata is kept alive by GC.
    71   // This is primarily useful for metadata which is considered as weak roots
    71   // This is primarily useful for metadata which is considered as weak roots
    72   // by the GC but need to be strong roots if reachable from a current compilation.
    72   // by the GC but need to be strong roots if reachable from a current compilation.
    73   // InstanceKlass are created for both weak and strong metadata.  Ensuring this metadata
    73   // InstanceKlass are created for both weak and strong metadata.  Ensuring this metadata
    74   // alive covers the cases where there are weak roots without performance cost.
    74   // alive covers the cases where there are weak roots without performance cost.
    75   oop holder = ik->holder_phantom();
    75   oop holder = ik->klass_holder();
    76   if (ik->is_unsafe_anonymous()) {
    76   if (ik->is_unsafe_anonymous()) {
    77     // Though ciInstanceKlass records class loader oop, it's not enough to keep
    77     // Though ciInstanceKlass records class loader oop, it's not enough to keep
    78     // VM unsafe anonymous classes alive (loader == NULL). Klass holder should
    78     // VM unsafe anonymous classes alive (loader == NULL). Klass holder should
    79     // be used instead. It is enough to record a ciObject, since cached elements are never removed
    79     // be used instead. It is enough to record a ciObject, since cached elements are never removed
    80     // during ciObjectFactory lifetime. ciObjectFactory itself is created for
    80     // during ciObjectFactory lifetime. ciObjectFactory itself is created for