Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/share/vm/oops/klass.cpp
32285 views
/*1* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#include "precompiled.hpp"25#include "classfile/javaClasses.hpp"26#include "classfile/dictionary.hpp"27#include "classfile/systemDictionary.hpp"28#include "classfile/vmSymbols.hpp"29#include "gc_implementation/shared/markSweep.inline.hpp"30#include "gc_interface/collectedHeap.inline.hpp"31#include "memory/heapInspection.hpp"32#include "memory/metadataFactory.hpp"33#include "memory/oopFactory.hpp"34#include "memory/resourceArea.hpp"35#include "oops/instanceKlass.hpp"36#include "oops/klass.inline.hpp"37#include "oops/oop.inline2.hpp"38#include "runtime/atomic.inline.hpp"39#include "runtime/orderAccess.inline.hpp"40#include "utilities/stack.hpp"41#include "utilities/macros.hpp"42#if INCLUDE_ALL_GCS43#include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"44#include "gc_implementation/parallelScavenge/psParallelCompact.hpp"45#include "gc_implementation/parallelScavenge/psPromotionManager.hpp"46#include "gc_implementation/parallelScavenge/psScavenge.hpp"47#endif // INCLUDE_ALL_GCS48#if INCLUDE_JFR49#include "jfr/support/jfrTraceIdExtension.hpp"50#endif5152bool Klass::is_cloneable() const {53return _access_flags.is_cloneable() ||54is_subtype_of(SystemDictionary::Cloneable_klass());55}5657void Klass::set_is_cloneable() {58if (oop_is_instance() && InstanceKlass::cast(this)->reference_type() != REF_NONE) {59// Reference cloning should not be intrinsified and always happen in JVM_Clone.60} else {61_access_flags.set_is_cloneable();62}63}6465void Klass::set_name(Symbol* n) {66_name = n;67if (_name != NULL) _name->increment_refcount();68}6970bool Klass::is_subclass_of(const Klass* k) const {71// Run up the super chain and check72if (this == k) return true;7374Klass* t = const_cast<Klass*>(this)->super();7576while (t != NULL) {77if (t == k) return true;78t = t->super();79}80return false;81}8283bool Klass::search_secondary_supers(Klass* k) const {84// Put some extra logic here out-of-line, before the search proper.85// This cuts down the size of the inline method.8687// This is necessary, since I am never in my own secondary_super list.88if (this == k)89return true;90// Scan the array-of-objects for a match91int cnt = secondary_supers()->length();92for (int i = 0; i < cnt; i++) {93if (secondary_supers()->at(i) == k) {94((Klass*)this)->set_secondary_super_cache(k);95return true;96}97}98return false;99}100101// Return self, except for abstract classes with exactly 1102// implementor. Then return the 1 concrete implementation.103Klass *Klass::up_cast_abstract() {104Klass *r = this;105while( r->is_abstract() ) { // Receiver is abstract?106Klass *s = r->subklass(); // Check for exactly 1 subklass107if( !s || s->next_sibling() ) // Oops; wrong count; give up108return this; // Return 'this' as a no-progress flag109r = s; // Loop till find concrete class110}111return r; // Return the 1 concrete class112}113114// Find LCA in class hierarchy115Klass *Klass::LCA( Klass *k2 ) {116Klass *k1 = this;117while( 1 ) {118if( k1->is_subtype_of(k2) ) return k2;119if( k2->is_subtype_of(k1) ) return k1;120k1 = k1->super();121k2 = k2->super();122}123}124125126void Klass::check_valid_for_instantiation(bool throwError, TRAPS) {127ResourceMark rm(THREAD);128THROW_MSG(throwError ? vmSymbols::java_lang_InstantiationError()129: vmSymbols::java_lang_InstantiationException(), external_name());130}131132133void Klass::copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, TRAPS) {134THROW(vmSymbols::java_lang_ArrayStoreException());135}136137138void Klass::initialize(TRAPS) {139ShouldNotReachHere();140}141142bool Klass::compute_is_subtype_of(Klass* k) {143assert(k->is_klass(), "argument must be a class");144return is_subclass_of(k);145}146147Klass* Klass::find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const {148#ifdef ASSERT149tty->print_cr("Error: find_field called on a klass oop."150" Likely error: reflection method does not correctly"151" wrap return value in a mirror object.");152#endif153ShouldNotReachHere();154return NULL;155}156157Method* Klass::uncached_lookup_method(Symbol* name, Symbol* signature, OverpassLookupMode overpass_mode) const {158#ifdef ASSERT159tty->print_cr("Error: uncached_lookup_method called on a klass oop."160" Likely error: reflection method does not correctly"161" wrap return value in a mirror object.");162#endif163ShouldNotReachHere();164return NULL;165}166167void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw() {168return Metaspace::allocate(loader_data, word_size, /*read_only*/false,169MetaspaceObj::ClassType, THREAD);170}171172Klass::Klass() {173Klass* k = this;174175// Preinitialize supertype information.176// A later call to initialize_supers() may update these settings:177set_super(NULL);178for (juint i = 0; i < Klass::primary_super_limit(); i++) {179_primary_supers[i] = NULL;180}181set_secondary_supers(NULL);182set_secondary_super_cache(NULL);183_primary_supers[0] = k;184set_super_check_offset(in_bytes(primary_supers_offset()));185186// The constructor is used from init_self_patching_vtbl_list,187// which doesn't zero out the memory before calling the constructor.188// Need to set the field explicitly to not hit an assert that the field189// should be NULL before setting it.190_java_mirror = NULL;191192set_modifier_flags(0);193set_layout_helper(Klass::_lh_neutral_value);194set_name(NULL);195AccessFlags af;196af.set_flags(0);197set_access_flags(af);198set_subklass(NULL);199set_next_sibling(NULL);200set_next_link(NULL);201202set_prototype_header(markOopDesc::prototype());203set_biased_lock_revocation_count(0);204set_last_biased_lock_bulk_revocation_time(0);205206// The klass doesn't have any references at this point.207clear_modified_oops();208clear_accumulated_modified_oops();209_shared_class_path_index = -1;210}211212jint Klass::array_layout_helper(BasicType etype) {213assert(etype >= T_BOOLEAN && etype <= T_OBJECT, "valid etype");214// Note that T_ARRAY is not allowed here.215int hsize = arrayOopDesc::base_offset_in_bytes(etype);216int esize = type2aelembytes(etype);217bool isobj = (etype == T_OBJECT);218int tag = isobj ? _lh_array_tag_obj_value : _lh_array_tag_type_value;219int lh = array_layout_helper(tag, hsize, etype, exact_log2(esize));220221assert(lh < (int)_lh_neutral_value, "must look like an array layout");222assert(layout_helper_is_array(lh), "correct kind");223assert(layout_helper_is_objArray(lh) == isobj, "correct kind");224assert(layout_helper_is_typeArray(lh) == !isobj, "correct kind");225assert(layout_helper_header_size(lh) == hsize, "correct decode");226assert(layout_helper_element_type(lh) == etype, "correct decode");227assert(1 << layout_helper_log2_element_size(lh) == esize, "correct decode");228229return lh;230}231232bool Klass::can_be_primary_super_slow() const {233if (super() == NULL)234return true;235else if (super()->super_depth() >= primary_super_limit()-1)236return false;237else238return true;239}240241void Klass::initialize_supers(Klass* k, TRAPS) {242if (FastSuperclassLimit == 0) {243// None of the other machinery matters.244set_super(k);245return;246}247if (k == NULL) {248set_super(NULL);249_primary_supers[0] = this;250assert(super_depth() == 0, "Object must already be initialized properly");251} else if (k != super() || k == SystemDictionary::Object_klass()) {252assert(super() == NULL || super() == SystemDictionary::Object_klass(),253"initialize this only once to a non-trivial value");254set_super(k);255Klass* sup = k;256int sup_depth = sup->super_depth();257juint my_depth = MIN2(sup_depth + 1, (int)primary_super_limit());258if (!can_be_primary_super_slow())259my_depth = primary_super_limit();260for (juint i = 0; i < my_depth; i++) {261_primary_supers[i] = sup->_primary_supers[i];262}263Klass* *super_check_cell;264if (my_depth < primary_super_limit()) {265_primary_supers[my_depth] = this;266super_check_cell = &_primary_supers[my_depth];267} else {268// Overflow of the primary_supers array forces me to be secondary.269super_check_cell = &_secondary_super_cache;270}271set_super_check_offset((address)super_check_cell - (address) this);272273#ifdef ASSERT274{275juint j = super_depth();276assert(j == my_depth, "computed accessor gets right answer");277Klass* t = this;278while (!t->can_be_primary_super()) {279t = t->super();280j = t->super_depth();281}282for (juint j1 = j+1; j1 < primary_super_limit(); j1++) {283assert(primary_super_of_depth(j1) == NULL, "super list padding");284}285while (t != NULL) {286assert(primary_super_of_depth(j) == t, "super list initialization");287t = t->super();288--j;289}290assert(j == (juint)-1, "correct depth count");291}292#endif293}294295if (secondary_supers() == NULL) {296KlassHandle this_kh (THREAD, this);297298// Now compute the list of secondary supertypes.299// Secondaries can occasionally be on the super chain,300// if the inline "_primary_supers" array overflows.301int extras = 0;302Klass* p;303for (p = super(); !(p == NULL || p->can_be_primary_super()); p = p->super()) {304++extras;305}306307ResourceMark rm(THREAD); // need to reclaim GrowableArrays allocated below308309// Compute the "real" non-extra secondaries.310GrowableArray<Klass*>* secondaries = compute_secondary_supers(extras);311if (secondaries == NULL) {312// secondary_supers set by compute_secondary_supers313return;314}315316GrowableArray<Klass*>* primaries = new GrowableArray<Klass*>(extras);317318for (p = this_kh->super(); !(p == NULL || p->can_be_primary_super()); p = p->super()) {319int i; // Scan for overflow primaries being duplicates of 2nd'arys320321// This happens frequently for very deeply nested arrays: the322// primary superclass chain overflows into the secondary. The323// secondary list contains the element_klass's secondaries with324// an extra array dimension added. If the element_klass's325// secondary list already contains some primary overflows, they326// (with the extra level of array-ness) will collide with the327// normal primary superclass overflows.328for( i = 0; i < secondaries->length(); i++ ) {329if( secondaries->at(i) == p )330break;331}332if( i < secondaries->length() )333continue; // It's a dup, don't put it in334primaries->push(p);335}336// Combine the two arrays into a metadata object to pack the array.337// The primaries are added in the reverse order, then the secondaries.338int new_length = primaries->length() + secondaries->length();339Array<Klass*>* s2 = MetadataFactory::new_array<Klass*>(340class_loader_data(), new_length, CHECK);341int fill_p = primaries->length();342for (int j = 0; j < fill_p; j++) {343s2->at_put(j, primaries->pop()); // add primaries in reverse order.344}345for( int j = 0; j < secondaries->length(); j++ ) {346s2->at_put(j+fill_p, secondaries->at(j)); // add secondaries on the end.347}348349#ifdef ASSERT350// We must not copy any NULL placeholders left over from bootstrap.351for (int j = 0; j < s2->length(); j++) {352assert(s2->at(j) != NULL, "correct bootstrapping order");353}354#endif355356this_kh->set_secondary_supers(s2);357}358}359360GrowableArray<Klass*>* Klass::compute_secondary_supers(int num_extra_slots) {361assert(num_extra_slots == 0, "override for complex klasses");362set_secondary_supers(Universe::the_empty_klass_array());363return NULL;364}365366367Klass* Klass::subklass() const {368return _subklass == NULL ? NULL : _subklass;369}370371InstanceKlass* Klass::superklass() const {372assert(super() == NULL || super()->oop_is_instance(), "must be instance klass");373return _super == NULL ? NULL : InstanceKlass::cast(_super);374}375376Klass* Klass::next_sibling() const {377return _next_sibling == NULL ? NULL : _next_sibling;378}379380void Klass::set_subklass(Klass* s) {381assert(s != this, "sanity check");382_subklass = s;383}384385void Klass::set_next_sibling(Klass* s) {386assert(s != this, "sanity check");387_next_sibling = s;388}389390void Klass::append_to_sibling_list() {391debug_only(verify();)392// add ourselves to superklass' subklass list393InstanceKlass* super = superklass();394if (super == NULL) return; // special case: class Object395assert((!super->is_interface() // interfaces cannot be supers396&& (super->superklass() == NULL || !is_interface())),397"an interface can only be a subklass of Object");398Klass* prev_first_subklass = super->subklass_oop();399if (prev_first_subklass != NULL) {400// set our sibling to be the superklass' previous first subklass401set_next_sibling(prev_first_subklass);402}403// make ourselves the superklass' first subklass404super->set_subklass(this);405debug_only(verify();)406}407408bool Klass::is_loader_alive(BoolObjectClosure* is_alive) {409#ifdef ASSERT410// The class is alive iff the class loader is alive.411oop loader = class_loader();412bool loader_alive = (loader == NULL) || is_alive->do_object_b(loader);413#endif // ASSERT414415// The class is alive if it's mirror is alive (which should be marked if the416// loader is alive) unless it's an anoymous class.417bool mirror_alive = is_alive->do_object_b(java_mirror());418assert(!mirror_alive || loader_alive, "loader must be alive if the mirror is"419" but not the other way around with anonymous classes");420return mirror_alive;421}422423void Klass::clean_weak_klass_links(BoolObjectClosure* is_alive, bool clean_alive_klasses) {424if (!ClassUnloading) {425return;426}427428Klass* root = SystemDictionary::Object_klass();429Stack<Klass*, mtGC> stack;430431stack.push(root);432while (!stack.is_empty()) {433Klass* current = stack.pop();434435assert(current->is_loader_alive(is_alive), "just checking, this should be live");436437// Find and set the first alive subklass438Klass* sub = current->subklass_oop();439while (sub != NULL && !sub->is_loader_alive(is_alive)) {440#ifndef PRODUCT441if (TraceClassUnloading && WizardMode) {442ResourceMark rm;443tty->print_cr("[Unlinking class (subclass) %s]", sub->external_name());444}445#endif446sub = sub->next_sibling_oop();447}448current->set_subklass(sub);449if (sub != NULL) {450stack.push(sub);451}452453// Find and set the first alive sibling454Klass* sibling = current->next_sibling_oop();455while (sibling != NULL && !sibling->is_loader_alive(is_alive)) {456if (TraceClassUnloading && WizardMode) {457ResourceMark rm;458tty->print_cr("[Unlinking class (sibling) %s]", sibling->external_name());459}460sibling = sibling->next_sibling_oop();461}462current->set_next_sibling(sibling);463if (sibling != NULL) {464stack.push(sibling);465}466467// Clean the implementors list and method data.468if (clean_alive_klasses && current->oop_is_instance()) {469InstanceKlass* ik = InstanceKlass::cast(current);470ik->clean_weak_instanceklass_links(is_alive);471472// JVMTI RedefineClasses creates previous versions that are not in473// the class hierarchy, so process them here.474while ((ik = ik->previous_versions()) != NULL) {475ik->clean_weak_instanceklass_links(is_alive);476}477}478}479}480481void Klass::klass_update_barrier_set(oop v) {482record_modified_oops();483}484485// This barrier is used by G1 to remember the old oop values, so486// that we don't forget any objects that were live at the snapshot at487// the beginning. This function is only used when we write oops into Klasses.488void Klass::klass_update_barrier_set_pre(oop* p, oop v) {489#if INCLUDE_ALL_GCS490if (UseG1GC || (UseShenandoahGC && ShenandoahSATBBarrier)) {491oop obj = *p;492if (obj != NULL) {493G1SATBCardTableModRefBS::enqueue(obj);494}495}496#endif497}498499void Klass::klass_oop_store(oop* p, oop v) {500assert(!Universe::heap()->is_in_reserved((void*)p), "Should store pointer into metadata");501assert(v == NULL || Universe::heap()->is_in_reserved((void*)v), "Should store pointer to an object");502503// do the store504if (always_do_update_barrier) {505klass_oop_store((volatile oop*)p, v);506} else {507klass_update_barrier_set_pre(p, v);508*p = v;509klass_update_barrier_set(v);510}511}512513void Klass::klass_oop_store(volatile oop* p, oop v) {514assert(!Universe::heap()->is_in_reserved((void*)p), "Should store pointer into metadata");515assert(v == NULL || Universe::heap()->is_in_reserved((void*)v), "Should store pointer to an object");516517klass_update_barrier_set_pre((oop*)p, v); // Cast away volatile.518OrderAccess::release_store_ptr(p, v);519klass_update_barrier_set(v);520}521522void Klass::oops_do(OopClosure* cl) {523cl->do_oop(&_java_mirror);524}525526void Klass::remove_unshareable_info() {527assert (DumpSharedSpaces, "only called for DumpSharedSpaces");528529JFR_ONLY(REMOVE_ID(this);)530set_subklass(NULL);531set_next_sibling(NULL);532// Clear the java mirror533set_java_mirror(NULL);534set_next_link(NULL);535536// Null out class_loader_data because we don't share that yet.537set_class_loader_data(NULL);538}539540void Klass::restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, TRAPS) {541JFR_ONLY(RESTORE_ID(this);)542// If an exception happened during CDS restore, some of these fields may already be543// set. We leave the class on the CLD list, even if incomplete so that we don't544// modify the CLD list outside a safepoint.545if (class_loader_data() == NULL) {546// Restore class_loader_data547set_class_loader_data(loader_data);548549// Add to class loader list first before creating the mirror550// (same order as class file parsing)551loader_data->add_class(this);552}553554// Recreate the class mirror.555// Only recreate it if not present. A previous attempt to restore may have556// gotten an OOM later but keep the mirror if it was created.557if (java_mirror() == NULL) {558java_lang_Class::create_mirror(this, class_loader(), protection_domain, CHECK);559}560}561562Klass* Klass::array_klass_or_null(int rank) {563EXCEPTION_MARK;564// No exception can be thrown by array_klass_impl when called with or_null == true.565// (In anycase, the execption mark will fail if it do so)566return array_klass_impl(true, rank, THREAD);567}568569570Klass* Klass::array_klass_or_null() {571EXCEPTION_MARK;572// No exception can be thrown by array_klass_impl when called with or_null == true.573// (In anycase, the execption mark will fail if it do so)574return array_klass_impl(true, THREAD);575}576577578Klass* Klass::array_klass_impl(bool or_null, int rank, TRAPS) {579fatal("array_klass should be dispatched to InstanceKlass, ObjArrayKlass or TypeArrayKlass");580return NULL;581}582583584Klass* Klass::array_klass_impl(bool or_null, TRAPS) {585fatal("array_klass should be dispatched to InstanceKlass, ObjArrayKlass or TypeArrayKlass");586return NULL;587}588589oop Klass::class_loader() const { return class_loader_data()->class_loader(); }590591const char* Klass::external_name() const {592if (oop_is_instance()) {593InstanceKlass* ik = (InstanceKlass*) this;594if (ik->is_anonymous()) {595assert(EnableInvokeDynamic, "");596intptr_t hash = 0;597if (ik->java_mirror() != NULL) {598// java_mirror might not be created yet, return 0 as hash.599hash = ik->java_mirror()->identity_hash();600}601char hash_buf[40];602sprintf(hash_buf, "/" UINTX_FORMAT, (uintx)hash);603size_t hash_len = strlen(hash_buf);604605size_t result_len = name()->utf8_length();606char* result = NEW_RESOURCE_ARRAY(char, result_len + hash_len + 1);607name()->as_klass_external_name(result, (int) result_len + 1);608assert(strlen(result) == result_len, "");609strcpy(result + result_len, hash_buf);610assert(strlen(result) == result_len + hash_len, "");611return result;612}613}614if (name() == NULL) return "<unknown>";615return name()->as_klass_external_name();616}617618619const char* Klass::signature_name() const {620if (name() == NULL) return "<unknown>";621return name()->as_C_string();622}623624// Unless overridden, modifier_flags is 0.625jint Klass::compute_modifier_flags(TRAPS) const {626return 0;627}628629int Klass::atomic_incr_biased_lock_revocation_count() {630return (int) Atomic::add(1, &_biased_lock_revocation_count);631}632633// Unless overridden, jvmti_class_status has no flags set.634jint Klass::jvmti_class_status() const {635return 0;636}637638639// Printing640641void Klass::print_on(outputStream* st) const {642ResourceMark rm;643// print title644st->print("%s", internal_name());645print_address_on(st);646st->cr();647}648649void Klass::oop_print_on(oop obj, outputStream* st) {650ResourceMark rm;651// print title652st->print_cr("%s ", internal_name());653obj->print_address_on(st);654655if (WizardMode) {656// print header657obj->mark()->print_on(st);658}659660// print class661st->print(" - klass: ");662obj->klass()->print_value_on(st);663st->cr();664}665666void Klass::oop_print_value_on(oop obj, outputStream* st) {667// print title668ResourceMark rm; // Cannot print in debug mode without this669st->print("%s", internal_name());670obj->print_address_on(st);671}672673#if INCLUDE_SERVICES674// Size Statistics675void Klass::collect_statistics(KlassSizeStats *sz) const {676sz->_klass_bytes = sz->count(this);677sz->_mirror_bytes = sz->count(java_mirror());678sz->_secondary_supers_bytes = sz->count_array(secondary_supers());679680sz->_ro_bytes += sz->_secondary_supers_bytes;681sz->_rw_bytes += sz->_klass_bytes + sz->_mirror_bytes;682}683#endif // INCLUDE_SERVICES684685// Verification686687void Klass::verify_on(outputStream* st) {688689// This can be expensive, but it is worth checking that this klass is actually690// in the CLD graph but not in production.691assert(Metaspace::contains((address)this), "Should be");692693guarantee(this->is_klass(),"should be klass");694695if (super() != NULL) {696guarantee(super()->is_klass(), "should be klass");697}698if (secondary_super_cache() != NULL) {699Klass* ko = secondary_super_cache();700guarantee(ko->is_klass(), "should be klass");701}702for ( uint i = 0; i < primary_super_limit(); i++ ) {703Klass* ko = _primary_supers[i];704if (ko != NULL) {705guarantee(ko->is_klass(), "should be klass");706}707}708709if (java_mirror() != NULL) {710guarantee(java_mirror()->is_oop(), "should be instance");711}712}713714void Klass::oop_verify_on(oop obj, outputStream* st) {715guarantee(obj->is_oop(), "should be oop");716guarantee(obj->klass()->is_klass(), "klass field is not a klass");717}718719#ifndef PRODUCT720721bool Klass::verify_vtable_index(int i) {722if (oop_is_instance()) {723int limit = ((InstanceKlass*)this)->vtable_length()/vtableEntry::size();724assert(i >= 0 && i < limit, err_msg("index %d out of bounds %d", i, limit));725} else {726assert(oop_is_array(), "Must be");727int limit = ((ArrayKlass*)this)->vtable_length()/vtableEntry::size();728assert(i >= 0 && i < limit, err_msg("index %d out of bounds %d", i, limit));729}730return true;731}732733bool Klass::verify_itable_index(int i) {734assert(oop_is_instance(), "");735int method_count = klassItable::method_count_for_interface(this);736assert(i >= 0 && i < method_count, "index out of bounds");737return true;738}739740#endif741742/////////////// Unit tests ///////////////743744#ifndef PRODUCT745746class TestKlass {747public:748static void test_oop_is_instanceClassLoader() {749assert(SystemDictionary::ClassLoader_klass()->oop_is_instanceClassLoader(), "assert");750assert(!SystemDictionary::String_klass()->oop_is_instanceClassLoader(), "assert");751}752};753754void TestKlass_test() {755TestKlass::test_oop_is_instanceClassLoader();756}757758#endif759760761