265 } |
265 } |
266 } |
266 } |
267 |
267 |
268 void initialize_basic_type_klass(Klass* k, TRAPS) { |
268 void initialize_basic_type_klass(Klass* k, TRAPS) { |
269 Klass* ok = SystemDictionary::Object_klass(); |
269 Klass* ok = SystemDictionary::Object_klass(); |
|
270 #if INCLUDE_CDS |
270 if (UseSharedSpaces) { |
271 if (UseSharedSpaces) { |
271 ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data(); |
272 ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data(); |
272 assert(k->super() == ok, "u3"); |
273 assert(k->super() == ok, "u3"); |
273 k->restore_unshareable_info(loader_data, Handle(), CHECK); |
274 k->restore_unshareable_info(loader_data, Handle(), CHECK); |
274 } else { |
275 } else |
|
276 #endif |
|
277 { |
275 k->initialize_supers(ok, CHECK); |
278 k->initialize_supers(ok, CHECK); |
276 } |
279 } |
277 k->append_to_sibling_list(); |
280 k->append_to_sibling_list(); |
278 } |
281 } |
279 |
282 |
323 Klass* ok = SystemDictionary::Object_klass(); |
326 Klass* ok = SystemDictionary::Object_klass(); |
324 |
327 |
325 _the_null_string = StringTable::intern("null", CHECK); |
328 _the_null_string = StringTable::intern("null", CHECK); |
326 _the_min_jint_string = StringTable::intern("-2147483648", CHECK); |
329 _the_min_jint_string = StringTable::intern("-2147483648", CHECK); |
327 |
330 |
|
331 #if INCLUDE_CDS |
328 if (UseSharedSpaces) { |
332 if (UseSharedSpaces) { |
329 // Verify shared interfaces array. |
333 // Verify shared interfaces array. |
330 assert(_the_array_interfaces_array->at(0) == |
334 assert(_the_array_interfaces_array->at(0) == |
331 SystemDictionary::Cloneable_klass(), "u3"); |
335 SystemDictionary::Cloneable_klass(), "u3"); |
332 assert(_the_array_interfaces_array->at(1) == |
336 assert(_the_array_interfaces_array->at(1) == |
333 SystemDictionary::Serializable_klass(), "u3"); |
337 SystemDictionary::Serializable_klass(), "u3"); |
334 MetaspaceShared::fixup_shared_string_regions(); |
338 MetaspaceShared::fixup_shared_string_regions(); |
335 } else { |
339 } else |
|
340 #endif |
|
341 { |
336 // Set up shared interfaces array. (Do this before supers are set up.) |
342 // Set up shared interfaces array. (Do this before supers are set up.) |
337 _the_array_interfaces_array->at_put(0, SystemDictionary::Cloneable_klass()); |
343 _the_array_interfaces_array->at_put(0, SystemDictionary::Cloneable_klass()); |
338 _the_array_interfaces_array->at_put(1, SystemDictionary::Serializable_klass()); |
344 _the_array_interfaces_array->at_put(1, SystemDictionary::Serializable_klass()); |
339 } |
345 } |
340 |
346 |
668 Universe::_loader_addClass_cache = new LatestMethodCache(); |
674 Universe::_loader_addClass_cache = new LatestMethodCache(); |
669 Universe::_pd_implies_cache = new LatestMethodCache(); |
675 Universe::_pd_implies_cache = new LatestMethodCache(); |
670 Universe::_throw_illegal_access_error_cache = new LatestMethodCache(); |
676 Universe::_throw_illegal_access_error_cache = new LatestMethodCache(); |
671 Universe::_do_stack_walk_cache = new LatestMethodCache(); |
677 Universe::_do_stack_walk_cache = new LatestMethodCache(); |
672 |
678 |
|
679 #if INCLUDE_CDS |
673 if (UseSharedSpaces) { |
680 if (UseSharedSpaces) { |
674 // Read the data structures supporting the shared spaces (shared |
681 // Read the data structures supporting the shared spaces (shared |
675 // system dictionary, symbol table, etc.). After that, access to |
682 // system dictionary, symbol table, etc.). After that, access to |
676 // the file (other than the mapped regions) is no longer needed, and |
683 // the file (other than the mapped regions) is no longer needed, and |
677 // the file is closed. Closing the file does not affect the |
684 // the file is closed. Closing the file does not affect the |
678 // currently mapped regions. |
685 // currently mapped regions. |
679 MetaspaceShared::initialize_shared_spaces(); |
686 MetaspaceShared::initialize_shared_spaces(); |
680 StringTable::create_table(); |
687 StringTable::create_table(); |
681 } else { |
688 } else |
|
689 #endif |
|
690 { |
682 SymbolTable::create_table(); |
691 SymbolTable::create_table(); |
683 StringTable::create_table(); |
692 StringTable::create_table(); |
684 |
693 |
|
694 #if INCLUDE_CDS |
685 if (DumpSharedSpaces) { |
695 if (DumpSharedSpaces) { |
686 MetaspaceShared::prepare_for_dumping(); |
696 MetaspaceShared::prepare_for_dumping(); |
687 } |
697 } |
|
698 #endif |
688 } |
699 } |
689 if (strlen(VerifySubSet) > 0) { |
700 if (strlen(VerifySubSet) > 0) { |
690 Universe::initialize_verify_flags(); |
701 Universe::initialize_verify_flags(); |
691 } |
702 } |
692 |
703 |