From a87262efb2c0f5ed1773533d69d7d2091eba1462 Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Thu, 4 May 2023 17:42:14 +0000 Subject: [PATCH] 8307295: Add warning to not create new ACC flags Reviewed-by: dholmes, fparain --- src/hotspot/share/utilities/accessFlags.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/hotspot/share/utilities/accessFlags.hpp b/src/hotspot/share/utilities/accessFlags.hpp index 1d9849aa985..78bf179e03a 100644 --- a/src/hotspot/share/utilities/accessFlags.hpp +++ b/src/hotspot/share/utilities/accessFlags.hpp @@ -37,12 +37,13 @@ class outputStream; enum { // See jvm.h for shared JVM_ACC_XXX access flags - // HotSpot-specific access flags - // flags actually put in .class file JVM_ACC_WRITTEN_FLAGS = 0x00007FFF, - // Klass* flags + // HotSpot-specific access flags + // These Klass flags should be migrated, to a field such as InstanceKlass::_misc_flags, + // or to a similar flags field in Klass itself. + // Do not add new ACC flags here. JVM_ACC_HAS_FINALIZER = 0x40000000, // True if klass has a non-empty finalize() method JVM_ACC_IS_CLONEABLE_FAST = (int)0x80000000,// True if klass implements the Cloneable interface and can be optimized in generated code JVM_ACC_IS_HIDDEN_CLASS = 0x04000000, // True if klass is hidden @@ -53,7 +54,7 @@ enum { class AccessFlags { friend class VMStructs; private: - jint _flags; + jint _flags; // TODO: move 4 access flags above to Klass and change to u2 public: AccessFlags() : _flags(0) {}