mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-04 08:10:36 +00:00
8215492: Rename INTERNAL_EMPTY to something less "internal"
Reviewed-by: kbarrett, coleenp
This commit is contained in:
parent
a4d4c07f7b
commit
316924a7bd
@ -48,11 +48,11 @@
|
||||
#ifdef SUPPORT_BARRIER_ON_PRIMITIVES
|
||||
#define ACCESS_PRIMITIVE_SUPPORT INTERNAL_BT_BARRIER_ON_PRIMITIVES
|
||||
#else
|
||||
#define ACCESS_PRIMITIVE_SUPPORT INTERNAL_EMPTY
|
||||
#define ACCESS_PRIMITIVE_SUPPORT DECORATORS_NONE
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_NOT_TO_SPACE_INVARIANT
|
||||
#define ACCESS_TO_SPACE_INVARIANT_SUPPORT INTERNAL_EMPTY
|
||||
#define ACCESS_TO_SPACE_INVARIANT_SUPPORT DECORATORS_NONE
|
||||
#else
|
||||
#define ACCESS_TO_SPACE_INVARIANT_SUPPORT INTERNAL_BT_TO_SPACE_INVARIANT
|
||||
#endif
|
||||
|
||||
@ -32,5 +32,5 @@
|
||||
template struct RuntimeDispatch<DecoratorFixup<decorators>::value, T, barrier_type>
|
||||
|
||||
namespace AccessInternal {
|
||||
INSTANTIATE_HPP_ACCESS(INTERNAL_EMPTY, oop, BARRIER_EQUALS);
|
||||
INSTANTIATE_HPP_ACCESS(DECORATORS_NONE, oop, BARRIER_EQUALS);
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@
|
||||
// access.inline.hpp. The accesses that are allowed through the access.hpp file
|
||||
// must be instantiated in access.cpp using the INSTANTIATE_HPP_ACCESS macro.
|
||||
|
||||
template <DecoratorSet decorators = INTERNAL_EMPTY>
|
||||
template <DecoratorSet decorators = DECORATORS_NONE>
|
||||
class Access: public AllStatic {
|
||||
// This function asserts that if an access gets passed in a decorator outside
|
||||
// of the expected_decorators, then something is wrong. It additionally checks
|
||||
@ -272,7 +272,7 @@ public:
|
||||
}
|
||||
|
||||
static oop resolve(oop obj) {
|
||||
verify_decorators<INTERNAL_EMPTY>();
|
||||
verify_decorators<DECORATORS_NONE>();
|
||||
return AccessInternal::resolve<decorators>(obj);
|
||||
}
|
||||
|
||||
@ -284,21 +284,21 @@ public:
|
||||
|
||||
// Helper for performing raw accesses (knows only of memory ordering
|
||||
// atomicity decorators as well as compressed oops)
|
||||
template <DecoratorSet decorators = INTERNAL_EMPTY>
|
||||
template <DecoratorSet decorators = DECORATORS_NONE>
|
||||
class RawAccess: public Access<AS_RAW | decorators> {};
|
||||
|
||||
// Helper for performing normal accesses on the heap. These accesses
|
||||
// may resolve an accessor on a GC barrier set
|
||||
template <DecoratorSet decorators = INTERNAL_EMPTY>
|
||||
template <DecoratorSet decorators = DECORATORS_NONE>
|
||||
class HeapAccess: public Access<IN_HEAP | decorators> {};
|
||||
|
||||
// Helper for performing normal accesses in roots. These accesses
|
||||
// may resolve an accessor on a GC barrier set
|
||||
template <DecoratorSet decorators = INTERNAL_EMPTY>
|
||||
template <DecoratorSet decorators = DECORATORS_NONE>
|
||||
class NativeAccess: public Access<IN_NATIVE | decorators> {};
|
||||
|
||||
// Helper for array access.
|
||||
template <DecoratorSet decorators = INTERNAL_EMPTY>
|
||||
template <DecoratorSet decorators = DECORATORS_NONE>
|
||||
class ArrayAccess: public HeapAccess<IS_ARRAY | decorators> {
|
||||
typedef HeapAccess<IS_ARRAY | decorators> AccessT;
|
||||
public:
|
||||
|
||||
@ -1192,7 +1192,7 @@ namespace AccessInternal {
|
||||
DecayedT decayed_value = value;
|
||||
const DecoratorSet expanded_decorators = DecoratorFixup<decorators |
|
||||
(HasDecorator<decorators, INTERNAL_VALUE_IS_OOP>::value ?
|
||||
INTERNAL_CONVERT_COMPRESSED_OOP : INTERNAL_EMPTY)>::value;
|
||||
INTERNAL_CONVERT_COMPRESSED_OOP : DECORATORS_NONE)>::value;
|
||||
PreRuntimeDispatch::store_at<expanded_decorators>(base, offset, decayed_value);
|
||||
}
|
||||
|
||||
@ -1221,7 +1221,7 @@ namespace AccessInternal {
|
||||
// Potentially remember if we need compressed oop awareness
|
||||
const DecoratorSet expanded_decorators = DecoratorFixup<decorators |
|
||||
(HasDecorator<decorators, INTERNAL_VALUE_IS_OOP>::value ?
|
||||
INTERNAL_CONVERT_COMPRESSED_OOP : INTERNAL_EMPTY)>::value;
|
||||
INTERNAL_CONVERT_COMPRESSED_OOP : DECORATORS_NONE)>::value;
|
||||
return PreRuntimeDispatch::load_at<expanded_decorators, DecayedT>(base, offset);
|
||||
}
|
||||
|
||||
@ -1253,7 +1253,7 @@ namespace AccessInternal {
|
||||
// Potentially remember that we need compressed oop awareness
|
||||
const DecoratorSet final_decorators = expanded_decorators |
|
||||
(HasDecorator<decorators, INTERNAL_VALUE_IS_OOP>::value ?
|
||||
INTERNAL_CONVERT_COMPRESSED_OOP : INTERNAL_EMPTY);
|
||||
INTERNAL_CONVERT_COMPRESSED_OOP : DECORATORS_NONE);
|
||||
return PreRuntimeDispatch::atomic_cmpxchg_at<final_decorators>(new_decayed_value, base,
|
||||
offset, compare_decayed_value);
|
||||
}
|
||||
@ -1278,7 +1278,7 @@ namespace AccessInternal {
|
||||
// atomic_xchg is only available in SEQ_CST flavour.
|
||||
const DecoratorSet expanded_decorators = DecoratorFixup<decorators | MO_SEQ_CST |
|
||||
(HasDecorator<decorators, INTERNAL_VALUE_IS_OOP>::value ?
|
||||
INTERNAL_CONVERT_COMPRESSED_OOP : INTERNAL_EMPTY)>::value;
|
||||
INTERNAL_CONVERT_COMPRESSED_OOP : DECORATORS_NONE)>::value;
|
||||
return PreRuntimeDispatch::atomic_xchg_at<expanded_decorators>(new_decayed_value, base, offset);
|
||||
}
|
||||
|
||||
|
||||
@ -43,12 +43,14 @@ typedef uint64_t DecoratorSet;
|
||||
template <DecoratorSet decorators, DecoratorSet decorator>
|
||||
struct HasDecorator: public IntegralConstant<bool, (decorators & decorator) != 0> {};
|
||||
|
||||
// == General Decorators ==
|
||||
// * DECORATORS_NONE: This is the name for the empty decorator set (in absence of other decorators).
|
||||
const DecoratorSet DECORATORS_NONE = UCONST64(0);
|
||||
|
||||
// == Internal Decorators - do not use ==
|
||||
// * INTERNAL_EMPTY: This is the name for the empty decorator set (in absence of other decorators).
|
||||
// * INTERNAL_CONVERT_COMPRESSED_OOPS: This is an oop access that will require converting an oop
|
||||
// to a narrowOop or vice versa, if UseCompressedOops is known to be set.
|
||||
// * INTERNAL_VALUE_IS_OOP: Remember that the involved access is on oop rather than primitive.
|
||||
const DecoratorSet INTERNAL_EMPTY = UCONST64(0);
|
||||
const DecoratorSet INTERNAL_CONVERT_COMPRESSED_OOP = UCONST64(1) << 1;
|
||||
const DecoratorSet INTERNAL_VALUE_IS_OOP = UCONST64(1) << 2;
|
||||
|
||||
@ -231,13 +233,13 @@ namespace AccessInternal {
|
||||
// If no reference strength has been picked, then strong will be picked
|
||||
static const DecoratorSet ref_strength_default = input_decorators |
|
||||
(((ON_DECORATOR_MASK & input_decorators) == 0 && (INTERNAL_VALUE_IS_OOP & input_decorators) != 0) ?
|
||||
ON_STRONG_OOP_REF : INTERNAL_EMPTY);
|
||||
ON_STRONG_OOP_REF : DECORATORS_NONE);
|
||||
// If no memory ordering has been picked, unordered will be picked
|
||||
static const DecoratorSet memory_ordering_default = ref_strength_default |
|
||||
((MO_DECORATOR_MASK & ref_strength_default) == 0 ? MO_UNORDERED : INTERNAL_EMPTY);
|
||||
((MO_DECORATOR_MASK & ref_strength_default) == 0 ? MO_UNORDERED : DECORATORS_NONE);
|
||||
// If no barrier strength has been picked, normal will be used
|
||||
static const DecoratorSet barrier_strength_default = memory_ordering_default |
|
||||
((AS_DECORATOR_MASK & memory_ordering_default) == 0 ? AS_NORMAL : INTERNAL_EMPTY);
|
||||
((AS_DECORATOR_MASK & memory_ordering_default) == 0 ? AS_NORMAL : DECORATORS_NONE);
|
||||
static const DecoratorSet value = barrier_strength_default | BT_BUILDTIME_DECORATORS;
|
||||
};
|
||||
|
||||
@ -247,13 +249,13 @@ namespace AccessInternal {
|
||||
// If no reference strength has been picked, then strong will be picked
|
||||
DecoratorSet ref_strength_default = input_decorators |
|
||||
(((ON_DECORATOR_MASK & input_decorators) == 0 && (INTERNAL_VALUE_IS_OOP & input_decorators) != 0) ?
|
||||
ON_STRONG_OOP_REF : INTERNAL_EMPTY);
|
||||
ON_STRONG_OOP_REF : DECORATORS_NONE);
|
||||
// If no memory ordering has been picked, unordered will be picked
|
||||
DecoratorSet memory_ordering_default = ref_strength_default |
|
||||
((MO_DECORATOR_MASK & ref_strength_default) == 0 ? MO_UNORDERED : INTERNAL_EMPTY);
|
||||
((MO_DECORATOR_MASK & ref_strength_default) == 0 ? MO_UNORDERED : DECORATORS_NONE);
|
||||
// If no barrier strength has been picked, normal will be used
|
||||
DecoratorSet barrier_strength_default = memory_ordering_default |
|
||||
((AS_DECORATOR_MASK & memory_ordering_default) == 0 ? AS_NORMAL : INTERNAL_EMPTY);
|
||||
((AS_DECORATOR_MASK & memory_ordering_default) == 0 ? AS_NORMAL : DECORATORS_NONE);
|
||||
DecoratorSet value = barrier_strength_default | BT_BUILDTIME_DECORATORS;
|
||||
return value;
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ jobject JNIHandles::make_weak_global(Handle obj, AllocFailType alloc_failmode) {
|
||||
oop JNIHandles::resolve_external_guard(jobject handle) {
|
||||
oop result = NULL;
|
||||
if (handle != NULL) {
|
||||
result = resolve_impl<0 /* decorators */, true /* external_guard */>(handle);
|
||||
result = resolve_impl<DECORATORS_NONE, true /* external_guard */>(handle);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ inline oop JNIHandles::resolve_impl(jobject handle) {
|
||||
inline oop JNIHandles::resolve(jobject handle) {
|
||||
oop result = NULL;
|
||||
if (handle != NULL) {
|
||||
result = resolve_impl<0 /* decorators */, false /* external_guard */>(handle);
|
||||
result = resolve_impl<DECORATORS_NONE, false /* external_guard */>(handle);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@ -89,7 +89,7 @@ inline bool JNIHandles::is_same_object(jobject handle1, jobject handle2) {
|
||||
|
||||
inline oop JNIHandles::resolve_non_null(jobject handle) {
|
||||
assert(handle != NULL, "JNI handle should not be null");
|
||||
oop result = resolve_impl<0 /* decorators */, false /* external_guard */>(handle);
|
||||
oop result = resolve_impl<DECORATORS_NONE, false /* external_guard */>(handle);
|
||||
assert(result != NULL, "NULL read from jni handle");
|
||||
return result;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user