53 |
53 |
54 ClassLoaderData* null_loader_data = ClassLoaderData::the_null_class_loader_data(); |
54 ClassLoaderData* null_loader_data = ClassLoaderData::the_null_class_loader_data(); |
55 |
55 |
56 TypeArrayKlass* ak = TypeArrayKlass::allocate(null_loader_data, type, sym, CHECK_NULL); |
56 TypeArrayKlass* ak = TypeArrayKlass::allocate(null_loader_data, type, sym, CHECK_NULL); |
57 |
57 |
|
58 // Call complete_create_array_klass after all instance variables have been initialized. |
|
59 complete_create_array_klass(ak, ak->super(), ModuleEntryTable::javabase_moduleEntry(), CHECK_NULL); |
|
60 |
58 // Add all classes to our internal class loader list here, |
61 // Add all classes to our internal class loader list here, |
59 // including classes in the bootstrap (NULL) class loader. |
62 // including classes in the bootstrap (NULL) class loader. |
60 // GC walks these as strong roots. |
63 // Do this step after creating the mirror so that if the |
|
64 // mirror creation fails, loaded_classes_do() doesn't find |
|
65 // an array class without a mirror. |
61 null_loader_data->add_class(ak); |
66 null_loader_data->add_class(ak); |
62 |
|
63 // Call complete_create_array_klass after all instance variables have been initialized. |
|
64 complete_create_array_klass(ak, ak->super(), ModuleEntryTable::javabase_moduleEntry(), CHECK_NULL); |
|
65 |
67 |
66 return ak; |
68 return ak; |
67 } |
69 } |
68 |
70 |
69 TypeArrayKlass* TypeArrayKlass::allocate(ClassLoaderData* loader_data, BasicType type, Symbol* name, TRAPS) { |
71 TypeArrayKlass* TypeArrayKlass::allocate(ClassLoaderData* loader_data, BasicType type, Symbol* name, TRAPS) { |