@@ -1378,6 +1378,37 @@ void SystemDictionary::load_shared_class_misc(InstanceKlass* ik, ClassLoaderData
1378
1378
}
1379
1379
}
1380
1380
}
1381
+
1382
+ void SystemDictionary::quick_resolve (InstanceKlass* klass, ClassLoaderData* loader_data, Handle domain, TRAPS) {
1383
+ assert (!Universe::is_fully_initialized (), " We can make short cuts only during VM initialization" );
1384
+ assert (klass->is_shared (), " Must be shared class" );
1385
+ if (klass->class_loader_data () != NULL ) {
1386
+ return ;
1387
+ }
1388
+
1389
+ // add super and interfaces first
1390
+ Klass* super = klass->super ();
1391
+ if (super != NULL && super->class_loader_data () == NULL ) {
1392
+ assert (super->is_instance_klass (), " Super should be instance klass" );
1393
+ quick_resolve (InstanceKlass::cast (super), loader_data, domain, CHECK);
1394
+ }
1395
+
1396
+ Array<InstanceKlass*>* ifs = klass->local_interfaces ();
1397
+ for (int i = 0 ; i < ifs->length (); i++) {
1398
+ InstanceKlass* ik = ifs->at (i);
1399
+ if (ik->class_loader_data () == NULL ) {
1400
+ quick_resolve (ik, loader_data, domain, CHECK);
1401
+ }
1402
+ }
1403
+
1404
+ klass->restore_unshareable_info (loader_data, domain, THREAD);
1405
+ load_shared_class_misc (klass, loader_data, CHECK);
1406
+ Dictionary* dictionary = loader_data->dictionary ();
1407
+ unsigned int hash = dictionary->compute_hash (klass->name ());
1408
+ dictionary->add_klass (hash, klass->name (), klass);
1409
+ add_to_hierarchy (klass, CHECK);
1410
+ assert (klass->is_loaded (), " Must be in at least loaded state" );
1411
+ }
1381
1412
#endif // INCLUDE_CDS
1382
1413
1383
1414
InstanceKlass* SystemDictionary::load_instance_class (Symbol* class_name, Handle class_loader, TRAPS) {
@@ -1918,43 +1949,13 @@ bool SystemDictionary::is_well_known_klass(Symbol* class_name) {
1918
1949
}
1919
1950
#endif
1920
1951
1921
- void SystemDictionary::quick_resolve (InstanceKlass* klass, ClassLoaderData* loader_data, Handle domain, TRAPS) {
1922
- assert (!Universe::is_fully_initialized (), " We can make short cuts only during VM initialization" );
1923
- assert (klass->is_shared (), " Must be shared class" );
1924
- if (klass->class_loader_data () != NULL ) {
1925
- return ;
1926
- }
1927
-
1928
- // add super and interfaces first
1929
- Klass* super = klass->super ();
1930
- if (super != NULL && super->class_loader_data () == NULL ) {
1931
- assert (super->is_instance_klass (), " Super should be instance klass" );
1932
- quick_resolve (InstanceKlass::cast (super), loader_data, domain, CHECK);
1933
- }
1934
-
1935
- Array<InstanceKlass*>* ifs = klass->local_interfaces ();
1936
- for (int i = 0 ; i < ifs->length (); i++) {
1937
- InstanceKlass* ik = ifs->at (i);
1938
- if (ik->class_loader_data () == NULL ) {
1939
- quick_resolve (ik, loader_data, domain, CHECK);
1940
- }
1941
- }
1942
-
1943
- klass->restore_unshareable_info (loader_data, domain, THREAD);
1944
- load_shared_class_misc (klass, loader_data, CHECK);
1945
- Dictionary* dictionary = loader_data->dictionary ();
1946
- unsigned int hash = dictionary->compute_hash (klass->name ());
1947
- dictionary->add_klass (hash, klass->name (), klass);
1948
- add_to_hierarchy (klass, CHECK);
1949
- assert (klass->is_loaded (), " Must be in at least loaded state" );
1950
- }
1951
-
1952
1952
bool SystemDictionary::resolve_wk_klass (WKID id, TRAPS) {
1953
1953
assert (id >= (int )FIRST_WKID && id < (int )WKID_LIMIT, " oob" );
1954
1954
int sid = wk_init_info[id - FIRST_WKID];
1955
1955
Symbol* symbol = vmSymbols::symbol_at ((vmSymbols::SID)sid);
1956
1956
InstanceKlass** klassp = &_well_known_klasses[id];
1957
1957
1958
+ #if INCLUDE_CDS
1958
1959
if (UseSharedSpaces && !JvmtiExport::should_post_class_prepare ()) {
1959
1960
InstanceKlass* k = *klassp;
1960
1961
assert (k->is_shared_boot_class (), " must be" );
@@ -1963,6 +1964,7 @@ bool SystemDictionary::resolve_wk_klass(WKID id, TRAPS) {
1963
1964
quick_resolve (k, loader_data, Handle (), CHECK_false);
1964
1965
return true ;
1965
1966
}
1967
+ #endif // INCLUDE_CDS
1966
1968
1967
1969
if (!is_wk_klass_loaded (*klassp)) {
1968
1970
Klass* k = resolve_or_fail (symbol, true , CHECK_false);
0 commit comments