mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8184323: compile-time guard some UseSharedSpaces-only coding with the INCLUDE_CDS macro
Reviewed-by: jiangli, shade, simonis
This commit is contained in:
parent
62da378f03
commit
cf1044d114
5 changed files with 25 additions and 5 deletions
|
@ -2122,12 +2122,15 @@ void SystemDictionary::initialize_preloaded_classes(TRAPS) {
|
|||
// Preload commonly used klasses
|
||||
WKID scan = FIRST_WKID;
|
||||
// first do Object, then String, Class
|
||||
#if INCLUDE_CDS
|
||||
if (UseSharedSpaces) {
|
||||
initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Object_klass), scan, CHECK);
|
||||
// Initialize the constant pool for the Object_class
|
||||
Object_klass()->constants()->restore_unshareable_info(CHECK);
|
||||
initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK);
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
initialize_wk_klasses_through(WK_KLASS_ENUM_NAME(Class_klass), scan, CHECK);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue