From ecb4d03e97079ef51b7324646801e612af3d52ae Mon Sep 17 00:00:00 2001 From: Theresa Mammarella Date: Tue, 9 Jul 2024 08:52:35 -0400 Subject: [PATCH] Remove some value type primitive uses - remove J9ROMCLASS_IS_PRIMITIVE_VALUE_TYPE - remove J9AccPrimitiveValueType Signed-off-by: Theresa Mammarella --- runtime/oti/j9javaaccessflags.h | 1 - runtime/oti/j9modifiers_api.h | 6 ------ runtime/vm/createramclass.cpp | 7 +------ 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/runtime/oti/j9javaaccessflags.h b/runtime/oti/j9javaaccessflags.h index f4b8655d0ed..a27ffcd5695 100644 --- a/runtime/oti/j9javaaccessflags.h +++ b/runtime/oti/j9javaaccessflags.h @@ -54,7 +54,6 @@ #define J9AccInterface 0x00000200 /* class */ #define J9AccGetterMethod 0x00000200 /* method */ #define J9AccAbstract 0x00000400 /* class method */ -#define J9AccPrimitiveValueType 0x00000800 /* class(Valhalla) */ #define J9AccStrict 0x00000800 /* method */ #define J9AccSynthetic 0x00001000 /* class method field */ #define J9AccAnnotation 0x00002000 /* class */ diff --git a/runtime/oti/j9modifiers_api.h b/runtime/oti/j9modifiers_api.h index db350aa7cc3..e5560f2f810 100644 --- a/runtime/oti/j9modifiers_api.h +++ b/runtime/oti/j9modifiers_api.h @@ -87,12 +87,6 @@ #define J9ROMCLASS_IS_VALUE(romClass) FALSE #endif /* J9VM_OPT_VALHALLA_VALUE_TYPES */ -#if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) -#define J9ROMCLASS_IS_PRIMITIVE_VALUE_TYPE(romClass) _J9ROMCLASS_SUNMODIFIER_IS_SET((romClass), J9AccPrimitiveValueType) -#else /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ -#define J9ROMCLASS_IS_PRIMITIVE_VALUE_TYPE(romClass) FALSE -#endif /* defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) */ - #define J9ROMMETHOD_IS_GETTER(romMethod) _J9ROMMETHOD_J9MODIFIER_IS_SET((romMethod), J9AccGetterMethod) #define J9ROMMETHOD_IS_FORWARDER(romMethod) _J9ROMMETHOD_J9MODIFIER_IS_SET((romMethod), J9AccForwarderMethod) #define J9ROMMETHOD_IS_EMPTY(romMethod) _J9ROMMETHOD_J9MODIFIER_IS_SET((romMethod), J9AccEmptyMethod) diff --git a/runtime/vm/createramclass.cpp b/runtime/vm/createramclass.cpp index 0658398598f..a72ea536024 100644 --- a/runtime/vm/createramclass.cpp +++ b/runtime/vm/createramclass.cpp @@ -2310,13 +2310,8 @@ internalCreateRAMClassDone(J9VMThread *vmThread, J9ClassLoader *classLoader, J9C } } #if defined(J9VM_OPT_VALHALLA_FLATTENABLE_VALUE_TYPES) - if (J9ROMCLASS_IS_PRIMITIVE_VALUE_TYPE(romClass) - || J9_ARE_ALL_BITS_SET(classFlags, J9ClassAllowsInitialDefaultValue) - ) { + if (J9_ARE_ALL_BITS_SET(classFlags, J9ClassAllowsInitialDefaultValue)) { UDATA instanceSize = state->ramClass->totalInstanceSize; - if (J9ROMCLASS_IS_PRIMITIVE_VALUE_TYPE(romClass)) { - classFlags |= J9ClassIsPrimitiveValueType; - } if ((instanceSize <= javaVM->valueFlatteningThreshold) && !J9ROMCLASS_IS_CONTENDED(romClass) ) {