equal
deleted
inserted
replaced
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 |