2129 int sid = (info >> CEIL_LG_OPTION_LIMIT);
2130 int opt = (info & right_n_bits(CEIL_LG_OPTION_LIMIT));
2131
2132 initialize_wk_klass((WKID)id, opt, CHECK);
2133 }
2134
2135 // move the starting value forward to the limit:
2136 start_id = limit_id;
2137 }
2138
2139 void SystemDictionary::initialize_preloaded_classes(TRAPS) {
2140 assert(WK_KLASS(Object_klass) == NULL, "preloaded classes should only be initialized once");
2141
2142 // Create the ModuleEntry for java.base. This call needs to be done here,
2143 // after vmSymbols::initialize() is called but before any classes are pre-loaded.
2144 ClassLoader::classLoader_init2(CHECK);
2145
2146 // Preload commonly used klasses
2147 WKID scan = FIRST_WKID;
2148 // first do Object, then String, Class
2149 if (UseSharedSpaces) {
2150 initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Object_klass), scan, CHECK);
2151 // Initialize the constant pool for the Object_class
2152 InstanceKlass* ik = InstanceKlass::cast(Object_klass());
2153 ik->constants()->restore_unshareable_info(CHECK);
2154 initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK);
2155 } else {
2156 initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK);
2157 }
2158
2159 // Calculate offsets for String and Class classes since they are loaded and
2160 // can be used after this point.
2161 java_lang_String::compute_offsets();
2162 java_lang_Class::compute_offsets();
2163
2164 // Fixup mirrors for classes loaded before java.lang.Class.
2165 // These calls iterate over the objects currently in the perm gen
2166 // so calling them at this point is matters (not before when there
2167 // are fewer objects and not later after there are more objects
2168 // in the perm gen.
2169 Universe::initialize_basic_type_mirrors(CHECK);
2170 Universe::fixup_mirrors(CHECK);
2171
2172 // do a bunch more:
2173 initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Reference_klass), scan, CHECK);
2174
2175 // Preload ref klasses and set reference types
|
2129 int sid = (info >> CEIL_LG_OPTION_LIMIT);
2130 int opt = (info & right_n_bits(CEIL_LG_OPTION_LIMIT));
2131
2132 initialize_wk_klass((WKID)id, opt, CHECK);
2133 }
2134
2135 // move the starting value forward to the limit:
2136 start_id = limit_id;
2137 }
2138
2139 void SystemDictionary::initialize_preloaded_classes(TRAPS) {
2140 assert(WK_KLASS(Object_klass) == NULL, "preloaded classes should only be initialized once");
2141
2142 // Create the ModuleEntry for java.base. This call needs to be done here,
2143 // after vmSymbols::initialize() is called but before any classes are pre-loaded.
2144 ClassLoader::classLoader_init2(CHECK);
2145
2146 // Preload commonly used klasses
2147 WKID scan = FIRST_WKID;
2148 // first do Object, then String, Class
2149 #if INCLUDE_CDS
2150 if (UseSharedSpaces) {
2151 initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Object_klass), scan, CHECK);
2152 // Initialize the constant pool for the Object_class
2153 InstanceKlass* ik = InstanceKlass::cast(Object_klass());
2154 ik->constants()->restore_unshareable_info(CHECK);
2155 initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK);
2156 } else
2157 #endif
2158 {
2159 initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK);
2160 }
2161
2162 // Calculate offsets for String and Class classes since they are loaded and
2163 // can be used after this point.
2164 java_lang_String::compute_offsets();
2165 java_lang_Class::compute_offsets();
2166
2167 // Fixup mirrors for classes loaded before java.lang.Class.
2168 // These calls iterate over the objects currently in the perm gen
2169 // so calling them at this point is matters (not before when there
2170 // are fewer objects and not later after there are more objects
2171 // in the perm gen.
2172 Universe::initialize_basic_type_mirrors(CHECK);
2173 Universe::fixup_mirrors(CHECK);
2174
2175 // do a bunch more:
2176 initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Reference_klass), scan, CHECK);
2177
2178 // Preload ref klasses and set reference types
|