mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
8305405: Compile_lock not needed in Universe::genesis()
Reviewed-by: dholmes, fparain
(cherry picked from commit 1fd400608e)
This commit is contained in:
committed by
Vitaly Provodin
parent
d5c8957b6a
commit
829a354e57
@@ -328,31 +328,28 @@ void Universe::genesis(TRAPS) {
|
|||||||
|
|
||||||
{ AutoModifyRestore<bool> temporarily(_bootstrapping, true);
|
{ AutoModifyRestore<bool> temporarily(_bootstrapping, true);
|
||||||
|
|
||||||
{ MutexLocker mc(THREAD, Compile_lock);
|
java_lang_Class::allocate_fixup_lists();
|
||||||
|
|
||||||
java_lang_Class::allocate_fixup_lists();
|
// determine base vtable size; without that we cannot create the array klasses
|
||||||
|
compute_base_vtable_size();
|
||||||
|
|
||||||
// determine base vtable size; without that we cannot create the array klasses
|
if (!UseSharedSpaces) {
|
||||||
compute_base_vtable_size();
|
// Initialization of the fillerArrayKlass must come before regular
|
||||||
|
// int-TypeArrayKlass so that the int-Array mirror points to the
|
||||||
if (!UseSharedSpaces) {
|
// int-TypeArrayKlass.
|
||||||
// Initialization of the fillerArrayKlass must come before regular
|
_fillerArrayKlassObj = TypeArrayKlass::create_klass(T_INT, "Ljdk/internal/vm/FillerArray;", CHECK);
|
||||||
// int-TypeArrayKlass so that the int-Array mirror points to the
|
for (int i = T_BOOLEAN; i < T_LONG+1; i++) {
|
||||||
// int-TypeArrayKlass.
|
_typeArrayKlassObjs[i] = TypeArrayKlass::create_klass((BasicType)i, CHECK);
|
||||||
_fillerArrayKlassObj = TypeArrayKlass::create_klass(T_INT, "Ljdk/internal/vm/FillerArray;", CHECK);
|
|
||||||
for (int i = T_BOOLEAN; i < T_LONG+1; i++) {
|
|
||||||
_typeArrayKlassObjs[i] = TypeArrayKlass::create_klass((BasicType)i, CHECK);
|
|
||||||
}
|
|
||||||
|
|
||||||
ClassLoaderData* null_cld = ClassLoaderData::the_null_class_loader_data();
|
|
||||||
|
|
||||||
_the_array_interfaces_array = MetadataFactory::new_array<Klass*>(null_cld, 2, nullptr, CHECK);
|
|
||||||
_the_empty_int_array = MetadataFactory::new_array<int>(null_cld, 0, CHECK);
|
|
||||||
_the_empty_short_array = MetadataFactory::new_array<u2>(null_cld, 0, CHECK);
|
|
||||||
_the_empty_method_array = MetadataFactory::new_array<Method*>(null_cld, 0, CHECK);
|
|
||||||
_the_empty_klass_array = MetadataFactory::new_array<Klass*>(null_cld, 0, CHECK);
|
|
||||||
_the_empty_instance_klass_array = MetadataFactory::new_array<InstanceKlass*>(null_cld, 0, CHECK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ClassLoaderData* null_cld = ClassLoaderData::the_null_class_loader_data();
|
||||||
|
|
||||||
|
_the_array_interfaces_array = MetadataFactory::new_array<Klass*>(null_cld, 2, nullptr, CHECK);
|
||||||
|
_the_empty_int_array = MetadataFactory::new_array<int>(null_cld, 0, CHECK);
|
||||||
|
_the_empty_short_array = MetadataFactory::new_array<u2>(null_cld, 0, CHECK);
|
||||||
|
_the_empty_method_array = MetadataFactory::new_array<Method*>(null_cld, 0, CHECK);
|
||||||
|
_the_empty_klass_array = MetadataFactory::new_array<Klass*>(null_cld, 0, CHECK);
|
||||||
|
_the_empty_instance_klass_array = MetadataFactory::new_array<InstanceKlass*>(null_cld, 0, CHECK);
|
||||||
}
|
}
|
||||||
|
|
||||||
vmSymbols::initialize();
|
vmSymbols::initialize();
|
||||||
|
|||||||
Reference in New Issue
Block a user