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