< prev index next >

src/hotspot/share/memory/universe.cpp

Print this page

 304     ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
 305     assert(k->super() == ok, "u3");
 306     if (k->is_instance_klass()) {
 307       InstanceKlass::cast(k)->restore_unshareable_info(loader_data, Handle(), nullptr, CHECK);
 308     } else {
 309       ArrayKlass::cast(k)->restore_unshareable_info(loader_data, Handle(), CHECK);
 310     }
 311   } else
 312 #endif
 313   {
 314     k->initialize_supers(ok, nullptr, CHECK);
 315   }
 316   k->append_to_sibling_list();
 317 }
 318 
 319 void Universe::genesis(TRAPS) {
 320   ResourceMark rm(THREAD);
 321   HandleMark   hm(THREAD);
 322 
 323   // Explicit null checks are needed if these offsets are not smaller than the page size
 324   assert(oopDesc::klass_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 325          "Klass offset is expected to be less than the page size");





 326   assert(arrayOopDesc::length_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 327          "Array length offset is expected to be less than the page size");
 328 
 329   { AutoModifyRestore<bool> temporarily(_bootstrapping, true);
 330 
 331     java_lang_Class::allocate_fixup_lists();
 332 
 333     // determine base vtable size; without that we cannot create the array klasses
 334     compute_base_vtable_size();
 335 
 336     if (!UseSharedSpaces) {
 337       // Initialization of the fillerArrayKlass must come before regular
 338       // int-TypeArrayKlass so that the int-Array mirror points to the
 339       // int-TypeArrayKlass.
 340       _fillerArrayKlassObj = TypeArrayKlass::create_klass(T_INT, "Ljdk/internal/vm/FillerArray;", CHECK);
 341       for (int i = T_BOOLEAN; i < T_LONG+1; i++) {
 342         _typeArrayKlassObjs[i] = TypeArrayKlass::create_klass((BasicType)i, CHECK);
 343       }
 344 
 345       ClassLoaderData* null_cld = ClassLoaderData::the_null_class_loader_data();

 304     ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();
 305     assert(k->super() == ok, "u3");
 306     if (k->is_instance_klass()) {
 307       InstanceKlass::cast(k)->restore_unshareable_info(loader_data, Handle(), nullptr, CHECK);
 308     } else {
 309       ArrayKlass::cast(k)->restore_unshareable_info(loader_data, Handle(), CHECK);
 310     }
 311   } else
 312 #endif
 313   {
 314     k->initialize_supers(ok, nullptr, CHECK);
 315   }
 316   k->append_to_sibling_list();
 317 }
 318 
 319 void Universe::genesis(TRAPS) {
 320   ResourceMark rm(THREAD);
 321   HandleMark   hm(THREAD);
 322 
 323   // Explicit null checks are needed if these offsets are not smaller than the page size
 324   if (UseCompactObjectHeaders) {
 325     assert(oopDesc::mark_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 326            "Mark offset is expected to be less than the page size");
 327   } else {
 328     assert(oopDesc::klass_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 329            "Klass offset is expected to be less than the page size");
 330   }
 331   assert(arrayOopDesc::length_offset_in_bytes() < static_cast<intptr_t>(os::vm_page_size()),
 332          "Array length offset is expected to be less than the page size");
 333 
 334   { AutoModifyRestore<bool> temporarily(_bootstrapping, true);
 335 
 336     java_lang_Class::allocate_fixup_lists();
 337 
 338     // determine base vtable size; without that we cannot create the array klasses
 339     compute_base_vtable_size();
 340 
 341     if (!UseSharedSpaces) {
 342       // Initialization of the fillerArrayKlass must come before regular
 343       // int-TypeArrayKlass so that the int-Array mirror points to the
 344       // int-TypeArrayKlass.
 345       _fillerArrayKlassObj = TypeArrayKlass::create_klass(T_INT, "Ljdk/internal/vm/FillerArray;", CHECK);
 346       for (int i = T_BOOLEAN; i < T_LONG+1; i++) {
 347         _typeArrayKlassObjs[i] = TypeArrayKlass::create_klass((BasicType)i, CHECK);
 348       }
 349 
 350       ClassLoaderData* null_cld = ClassLoaderData::the_null_class_loader_data();
< prev index next >