< prev index next > src/hotspot/share/oops/instanceKlassFlags.hpp
Print this page
flag(defined_by_app_loader , 1 << 9) /* defining class loader is app class loader */ \
flag(has_contended_annotations , 1 << 10) /* has @Contended annotation */ \
flag(has_localvariable_table , 1 << 11) /* has localvariable information */ \
flag(has_miranda_methods , 1 << 12) /* True if this class has miranda methods in it's vtable */ \
flag(has_final_method , 1 << 13) /* True if klass has final method */ \
! flag(trust_final_fields , 1 << 14) /* All instance final fields in this class should be trusted */ \
/* end of list */
#define IK_FLAGS_ENUM_NAME(name, value) _misc_##name = value,
enum {
IK_FLAGS_DO(IK_FLAGS_ENUM_NAME)
};
#undef IK_FLAGS_ENUM_NAME
#define IK_STATUS_DO(status) \
status(is_being_redefined , 1 << 0) /* True if the klass is being redefined */ \
status(has_resolved_methods , 1 << 1) /* True if the klass has resolved MethodHandle methods */ \
status(has_been_redefined , 1 << 2) /* class has been redefined */ \
status(is_scratch_class , 1 << 3) /* class is the redefined scratch class */ \
flag(defined_by_app_loader , 1 << 9) /* defining class loader is app class loader */ \
flag(has_contended_annotations , 1 << 10) /* has @Contended annotation */ \
flag(has_localvariable_table , 1 << 11) /* has localvariable information */ \
flag(has_miranda_methods , 1 << 12) /* True if this class has miranda methods in it's vtable */ \
flag(has_final_method , 1 << 13) /* True if klass has final method */ \
! flag(has_inlined_fields , 1 << 14) /* has inlined fields and related embedded section is not empty */ \
+ flag(is_empty_inline_type , 1 << 15) /* empty inline type (*) */ \
+ flag(is_naturally_atomic , 1 << 16) /* loaded/stored in one instruction*/ \
+ flag(must_be_atomic , 1 << 17) /* doesn't allow tearing */ \
+ flag(has_loosely_consistent_annotation , 1 << 18) /* the class has the LooselyConsistentValue annotation WARNING: it doesn't automatically mean that the class allows tearing */ \
+ flag(has_strict_static_fields , 1 << 19) /* True if strict static fields declared */ \
+ flag(trust_final_fields , 1 << 20) /* All instance final fields in this class should be trusted */ \
+ flag(has_null_restricted_static_fields , 1 << 21) /* True if static null restricted fields declared */ \
/* end of list */
+ // (*) An inline type is considered empty if it contains no non-static fields or
+ // if it contains only empty inline fields. Note that JITs have a slightly different
+ // definition: empty inline fields must be flat otherwise the container won't
+ // be considered empty.
+
+ public:
#define IK_FLAGS_ENUM_NAME(name, value) _misc_##name = value,
enum {
IK_FLAGS_DO(IK_FLAGS_ENUM_NAME)
};
#undef IK_FLAGS_ENUM_NAME
+ private:
#define IK_STATUS_DO(status) \
status(is_being_redefined , 1 << 0) /* True if the klass is being redefined */ \
status(has_resolved_methods , 1 << 1) /* True if the klass has resolved MethodHandle methods */ \
status(has_been_redefined , 1 << 2) /* class has been redefined */ \
status(is_scratch_class , 1 << 3) /* class is the redefined scratch class */ \
u2 builtin_loader_type_bits() const {
return _misc_defined_by_boot_loader|_misc_defined_by_platform_loader|_misc_defined_by_app_loader;
}
// These flags are write-once before the class is published and then read-only so don't require atomic updates.
! u2 _flags;
// These flags are written during execution so require atomic stores
u1 _status;
public:
u2 builtin_loader_type_bits() const {
return _misc_defined_by_boot_loader|_misc_defined_by_platform_loader|_misc_defined_by_app_loader;
}
// These flags are write-once before the class is published and then read-only so don't require atomic updates.
! u4 _flags;
// These flags are written during execution so require atomic stores
u1 _status;
public:
return (_flags & builtin_loader_type_bits()) == 0;
}
void set_class_loader_type(const ClassLoaderData* cld);
+ u4 flags() const { return _flags; }
+
+ static u4 is_empty_inline_type_value() {
+ return _misc_is_empty_inline_type;
+ }
+
void assert_is_safe(bool set) NOT_DEBUG_RETURN;
// Create getters and setters for the status values.
#define IK_STATUS_GET_SET(name, ignore) \
bool name() const { return (_status & _misc_##name) != 0; } \
#undef IK_STATUS_GET_SET
void atomic_set_bits(u1 bits) { AtomicAccess::fetch_then_or(&_status, bits); }
void atomic_clear_bits(u1 bits) { AtomicAccess::fetch_then_and(&_status, (u1)(~bits)); }
void print_on(outputStream* st) const;
+
+ static ByteSize flags_offset() { return byte_offset_of(InstanceKlassFlags, _flags); }
};
#endif // SHARE_OOPS_INSTANCEKLASSFLAGS_HPP
< prev index next >