src/hotspot/share/ci/ciInstanceKlass.cpp
changeset 49738 a7bc87a63dd8
parent 49449 ef5d5d343e2a
child 51379 802f7e5e7e6b
equal deleted inserted replaced
49737:01960eec4570 49738:a7bc87a63dd8
    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->klass_holder_phantom();
    75   oop holder = ik->holder_phantom();
    76   if (ik->is_anonymous()) {
    76   if (ik->is_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 anonymous classes alive (loader == NULL). Klass holder should be used instead.
    78     // VM anonymous classes alive (loader == NULL). Klass holder should be used instead.
    79     // It is enough to record a ciObject, since cached elements are never removed
    79     // 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