diff -r cdffba164671 -r 3e5d28e6de32 src/hotspot/share/ci/ciInstanceKlass.cpp --- a/src/hotspot/share/ci/ciInstanceKlass.cpp Mon Aug 20 10:04:00 2018 +0200 +++ b/src/hotspot/share/ci/ciInstanceKlass.cpp Mon Aug 20 08:25:57 2018 -0400 @@ -62,7 +62,7 @@ _nonstatic_field_size = ik->nonstatic_field_size(); _has_nonstatic_fields = ik->has_nonstatic_fields(); _has_nonstatic_concrete_methods = ik->has_nonstatic_concrete_methods(); - _is_anonymous = ik->is_anonymous(); + _is_unsafe_anonymous = ik->is_unsafe_anonymous(); _nonstatic_fields = NULL; // initialized lazily by compute_nonstatic_fields: _has_injected_fields = -1; _implementor = NULL; // we will fill these lazily @@ -73,13 +73,13 @@ // InstanceKlass are created for both weak and strong metadata. Ensuring this metadata // alive covers the cases where there are weak roots without performance cost. oop holder = ik->holder_phantom(); - if (ik->is_anonymous()) { + if (ik->is_unsafe_anonymous()) { // Though ciInstanceKlass records class loader oop, it's not enough to keep - // VM anonymous classes alive (loader == NULL). Klass holder should be used instead. - // It is enough to record a ciObject, since cached elements are never removed + // VM unsafe anonymous classes alive (loader == NULL). Klass holder should + // be used instead. It is enough to record a ciObject, since cached elements are never removed // during ciObjectFactory lifetime. ciObjectFactory itself is created for // every compilation and lives for the whole duration of the compilation. - assert(holder != NULL, "holder of anonymous class is the mirror which is never null"); + assert(holder != NULL, "holder of unsafe anonymous class is the mirror which is never null"); (void)CURRENT_ENV->get_object(holder); } @@ -122,7 +122,7 @@ _has_nonstatic_fields = false; _nonstatic_fields = NULL; _has_injected_fields = -1; - _is_anonymous = false; + _is_unsafe_anonymous = false; _loader = loader; _protection_domain = protection_domain; _is_shared = false; @@ -615,12 +615,12 @@ return impl; } -ciInstanceKlass* ciInstanceKlass::host_klass() { +ciInstanceKlass* ciInstanceKlass::unsafe_anonymous_host() { assert(is_loaded(), "must be loaded"); - if (is_anonymous()) { + if (is_unsafe_anonymous()) { VM_ENTRY_MARK - Klass* host_klass = get_instanceKlass()->host_klass(); - return CURRENT_ENV->get_instance_klass(host_klass); + Klass* unsafe_anonymous_host = get_instanceKlass()->unsafe_anonymous_host(); + return CURRENT_ENV->get_instance_klass(unsafe_anonymous_host); } return NULL; }