diff --git a/src/hotspot/share/gc/shared/oopStorage.inline.hpp b/src/hotspot/share/gc/shared/oopStorage.inline.hpp index 4bcff174b5f..7cbf52ccbe7 100644 --- a/src/hotspot/share/gc/shared/oopStorage.inline.hpp +++ b/src/hotspot/share/gc/shared/oopStorage.inline.hpp @@ -361,7 +361,7 @@ inline bool OopStorage::iterate_impl(F f, Storage* storage) { assert_at_safepoint(); // Propagate const/non-const iteration to the block layer, by using // const or non-const blocks as corresponding to Storage. - typedef typename Conditional::value, const Block*, Block*>::type BlockPtr; + typedef typename ConditionalPrime::value, const Block*, Block*>::type BlockPtr; ActiveArray* blocks = storage->_active_array; size_t limit = blocks->block_count(); for (size_t i = 0; i < limit; ++i) { diff --git a/src/hotspot/share/gc/shared/oopStorageParState.hpp b/src/hotspot/share/gc/shared/oopStorageParState.hpp index 3f3d11393d8..ee0cbded512 100644 --- a/src/hotspot/share/gc/shared/oopStorageParState.hpp +++ b/src/hotspot/share/gc/shared/oopStorageParState.hpp @@ -167,9 +167,9 @@ template class OopStorage::ParState { BasicParState _basic_state; - typedef typename Conditional::type StoragePtr; + typedef typename ConditionalPrime::type StoragePtr; public: ParState(StoragePtr storage, diff --git a/src/hotspot/share/gc/shared/oopStorageParState.inline.hpp b/src/hotspot/share/gc/shared/oopStorageParState.inline.hpp index ce37d4ede93..7106b98d580 100644 --- a/src/hotspot/share/gc/shared/oopStorageParState.inline.hpp +++ b/src/hotspot/share/gc/shared/oopStorageParState.inline.hpp @@ -56,7 +56,7 @@ inline void OopStorage::BasicParState::iterate(F f) { while (claim_next_segment(&data)) { assert(data._segment_start < data._segment_end, "invariant"); assert(data._segment_end <= _block_count, "invariant"); - typedef typename Conditional::type BlockPtr; + typedef typename ConditionalPrime::type BlockPtr; size_t i = data._segment_start; do { BlockPtr block = _active_array->at(i); diff --git a/src/hotspot/share/metaprogramming/conditional.hpp b/src/hotspot/share/metaprogramming/conditional.hpp index 2d4fe1a86e8..e513bd93d6c 100644 --- a/src/hotspot/share/metaprogramming/conditional.hpp +++ b/src/hotspot/share/metaprogramming/conditional.hpp @@ -31,12 +31,12 @@ // is true. Otherwise it evaluates to FalseType. template -struct Conditional: AllStatic { +struct ConditionalPrime: AllStatic { typedef TrueType type; }; template -struct Conditional: AllStatic { +struct ConditionalPrime: AllStatic { typedef FalseType type; }; diff --git a/src/hotspot/share/oops/accessBackend.hpp b/src/hotspot/share/oops/accessBackend.hpp index 4fa92c53c16..984df299b87 100644 --- a/src/hotspot/share/oops/accessBackend.hpp +++ b/src/hotspot/share/oops/accessBackend.hpp @@ -49,7 +49,7 @@ template struct HeapOopType: AllStatic { static const bool needs_oop_compress = HasDecorator::value && HasDecorator::value; - typedef typename Conditional::type type; + typedef typename ConditionalPrime::type type; }; namespace AccessInternal { @@ -76,7 +76,7 @@ namespace AccessInternal { // and otherwise returns the same type T. template struct EncodedType: AllStatic { - typedef typename Conditional< + typedef typename ConditionalPrime< HasDecorator::value, typename HeapOopType::type, T>::type type; }; @@ -1114,7 +1114,7 @@ namespace AccessInternal { inline T load(P* addr) { verify_types(); typedef typename Decay

::type DecayedP; - typedef typename Conditional::value, + typedef typename ConditionalPrime::value, typename OopOrNarrowOop::type, typename Decay::type>::type DecayedT; // If a volatile address is passed in but no memory ordering decorator, @@ -1128,7 +1128,7 @@ namespace AccessInternal { template inline T load_at(oop base, ptrdiff_t offset) { verify_types(); - typedef typename Conditional::value, + typedef typename ConditionalPrime::value, typename OopOrNarrowOop::type, typename Decay::type>::type DecayedT; // Expand the decorators (figure out sensible defaults) diff --git a/src/hotspot/share/runtime/atomic.hpp b/src/hotspot/share/runtime/atomic.hpp index 7a71b6ce4f2..3020e417e0d 100644 --- a/src/hotspot/share/runtime/atomic.hpp +++ b/src/hotspot/share/runtime/atomic.hpp @@ -503,14 +503,14 @@ struct Atomic::PlatformStore { template inline void Atomic::inc(D volatile* dest, atomic_memory_order order) { STATIC_ASSERT(IsPointer::value || IsIntegral::value); - typedef typename Conditional::value, ptrdiff_t, D>::type I; + typedef typename ConditionalPrime::value, ptrdiff_t, D>::type I; Atomic::add(dest, I(1), order); } template inline void Atomic::dec(D volatile* dest, atomic_memory_order order) { STATIC_ASSERT(IsPointer::value || IsIntegral::value); - typedef typename Conditional::value, ptrdiff_t, D>::type I; + typedef typename ConditionalPrime::value, ptrdiff_t, D>::type I; // Assumes two's complement integer representation. #pragma warning(suppress: 4146) Atomic::add(dest, I(-1), order); @@ -522,8 +522,8 @@ inline D Atomic::sub(D volatile* dest, I sub_value, atomic_memory_order order) { STATIC_ASSERT(IsIntegral::value); // If D is a pointer type, use [u]intptr_t as the addend type, // matching signedness of I. Otherwise, use D as the addend type. - typedef typename Conditional::value, intptr_t, uintptr_t>::type PI; - typedef typename Conditional::value, PI, D>::type AddendType; + typedef typename ConditionalPrime::value, intptr_t, uintptr_t>::type PI; + typedef typename ConditionalPrime::value, PI, D>::type AddendType; // Only allow conversions that can't change the value. STATIC_ASSERT(IsSigned::value == IsSigned::value); STATIC_ASSERT(sizeof(I) <= sizeof(AddendType)); @@ -690,9 +690,9 @@ struct Atomic::AddImpl< { STATIC_ASSERT(sizeof(intptr_t) == sizeof(P*)); STATIC_ASSERT(sizeof(uintptr_t) == sizeof(P*)); - typedef typename Conditional::value, - intptr_t, - uintptr_t>::type CI; + typedef typename ConditionalPrime::value, + intptr_t, + uintptr_t>::type CI; static CI scale_addend(CI add_value) { return add_value * sizeof(P); diff --git a/src/hotspot/share/utilities/population_count.hpp b/src/hotspot/share/utilities/population_count.hpp index a88a27246fc..3f1eaf09d50 100644 --- a/src/hotspot/share/utilities/population_count.hpp +++ b/src/hotspot/share/utilities/population_count.hpp @@ -52,7 +52,7 @@ inline unsigned population_count(T x) { // We need to take care with implicit integer promotion when dealing with // integers < 32-bit. We chose to do this by explicitly widening constants // to unsigned - typedef typename Conditional<(sizeof(T) < sizeof(unsigned)), unsigned, T>::type P; + typedef typename ConditionalPrime<(sizeof(T) < sizeof(unsigned)), unsigned, T>::type P; const T all = ~T(0); // 0xFF..FF const P fives = all/3; // 0x55..55 const P threes = (all/15) * 3; // 0x33..33 diff --git a/test/hotspot/gtest/gc/shared/test_oopStorage.cpp b/test/hotspot/gtest/gc/shared/test_oopStorage.cpp index 4e0d3e16d99..555a3854e92 100644 --- a/test/hotspot/gtest/gc/shared/test_oopStorage.cpp +++ b/test/hotspot/gtest/gc/shared/test_oopStorage.cpp @@ -567,9 +567,9 @@ class OopStorageTest::CountingIterateClosure { template class OopStorageTest::VM_CountAtSafepoint : public VM_GTestExecuteAtSafepoint { public: - typedef typename Conditional::type Storage; + typedef typename ConditionalPrime::type Storage; VM_CountAtSafepoint(Storage* storage, CountingIterateClosure* cl) : _storage(storage), _cl(cl) @@ -792,9 +792,9 @@ const size_t OopStorageTestIteration::_max_workers; template class OopStorageTestIteration::VM_Verify : public VM_GTestExecuteAtSafepoint { public: - typedef typename Conditional::type Storage; + typedef typename ConditionalPrime::type Storage; VM_Verify(Storage* storage, VerifyState* vstate) : _storage(storage), _vstate(vstate), _result(false) @@ -892,9 +892,9 @@ template class OopStorageTestParIteration::Task : public AbstractGangTask { typedef OopStorage::ParState StateType; - typedef typename Conditional::type Storage; + typedef typename ConditionalPrime::type Storage; public: Task(const char* name, Storage* storage, VerifyState* vstate) : diff --git a/test/hotspot/gtest/metaprogramming/test_conditional.cpp b/test/hotspot/gtest/metaprogramming/test_conditional.cpp index 30fce1e22e8..70ff2605283 100644 --- a/test/hotspot/gtest/metaprogramming/test_conditional.cpp +++ b/test/hotspot/gtest/metaprogramming/test_conditional.cpp @@ -32,13 +32,13 @@ class ConditionalTest { class A: AllStatic {}; class B: AllStatic {}; - typedef Conditional::type A_B_if_true; + typedef ConditionalPrime::type A_B_if_true; static const bool A_B_if_true_is_A = IsSame::value; static const bool A_B_if_true_is_B = IsSame::value; STATIC_ASSERT(A_B_if_true_is_A); STATIC_ASSERT(!A_B_if_true_is_B); - typedef Conditional::type A_B_if_false; + typedef ConditionalPrime::type A_B_if_false; static const bool A_B_if_false_is_A = IsSame::value; static const bool A_B_if_false_is_B = IsSame::value; STATIC_ASSERT(!A_B_if_false_is_A);