< prev index next >

src/share/vm/classfile/systemDictionary.cpp

Print this page
rev 12859 : 8184323: compile-time guard some UseSharedSpaces-only coding with the INCLUDE_CDS macro

*** 2144,2160 **** ClassLoader::classLoader_init2(CHECK); // Preload commonly used klasses WKID scan = FIRST_WKID; // first do Object, then String, Class if (UseSharedSpaces) { initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Object_klass), scan, CHECK); // Initialize the constant pool for the Object_class InstanceKlass* ik = InstanceKlass::cast(Object_klass()); ik->constants()->restore_unshareable_info(CHECK); initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK); ! } else { initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK); } // Calculate offsets for String and Class classes since they are loaded and // can be used after this point. --- 2144,2163 ---- ClassLoader::classLoader_init2(CHECK); // Preload commonly used klasses WKID scan = FIRST_WKID; // first do Object, then String, Class + #if INCLUDE_CDS if (UseSharedSpaces) { initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Object_klass), scan, CHECK); // Initialize the constant pool for the Object_class InstanceKlass* ik = InstanceKlass::cast(Object_klass()); ik->constants()->restore_unshareable_info(CHECK); initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK); ! } else ! #endif ! { initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK); } // Calculate offsets for String and Class classes since they are loaded and // can be used after this point.
< prev index next >