diff --git a/src/hotspot/share/metaprogramming/isVolatile.hpp b/src/hotspot/share/metaprogramming/isVolatile.hpp deleted file mode 100644 index cd51e3b53e5cd..0000000000000 --- a/src/hotspot/share/metaprogramming/isVolatile.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#ifndef SHARE_METAPROGRAMMING_ISVOLATILE_HPP -#define SHARE_METAPROGRAMMING_ISVOLATILE_HPP - -#include "metaprogramming/integralConstant.hpp" - -template struct IsVolatile: public FalseType {}; -template struct IsVolatile: public TrueType {}; - -#endif // SHARE_METAPROGRAMMING_ISVOLATILE_HPP diff --git a/src/hotspot/share/oops/accessBackend.hpp b/src/hotspot/share/oops/accessBackend.hpp index 3bcfe797e0c34..716b15413dfa5 100644 --- a/src/hotspot/share/oops/accessBackend.hpp +++ b/src/hotspot/share/oops/accessBackend.hpp @@ -35,13 +35,13 @@ #include "metaprogramming/isIntegral.hpp" #include "metaprogramming/isPointer.hpp" #include "metaprogramming/isSame.hpp" -#include "metaprogramming/isVolatile.hpp" #include "oops/accessDecorators.hpp" #include "oops/oopsHierarchy.hpp" #include "runtime/globals.hpp" #include "utilities/debug.hpp" #include "utilities/globalDefinitions.hpp" +#include // This metafunction returns either oop or narrowOop depending on whether // an access needs to use compressed oops or not. @@ -1109,7 +1109,7 @@ namespace AccessInternal { // If a volatile address is passed in but no memory ordering decorator, // set the memory ordering to MO_RELAXED by default. const DecoratorSet expanded_decorators = DecoratorFixup< - (IsVolatile

::value && !HasDecorator::value) ? + (std::is_volatile

::value && !HasDecorator::value) ? (MO_RELAXED | decorators) : decorators>::value; store_reduce_types(const_cast(addr), decayed_value); } @@ -1135,7 +1135,7 @@ namespace AccessInternal { // If a volatile address is passed in but no memory ordering decorator, // set the memory ordering to MO_RELAXED by default. const DecoratorSet expanded_decorators = DecoratorFixup< - (IsVolatile

::value && !HasDecorator::value) ? + (std::is_volatile

::value && !HasDecorator::value) ? (MO_RELAXED | decorators) : decorators>::value; return load_reduce_types(const_cast(addr)); } diff --git a/test/hotspot/gtest/metaprogramming/test_isVolatile.cpp b/test/hotspot/gtest/metaprogramming/test_isVolatile.cpp deleted file mode 100644 index 4402cf2036b50..0000000000000 --- a/test/hotspot/gtest/metaprogramming/test_isVolatile.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#include "precompiled.hpp" -#include "memory/allocation.hpp" -#include "metaprogramming/isVolatile.hpp" -#include "utilities/debug.hpp" - -class IsVolatileTest { - class A: AllStatic {}; - - STATIC_ASSERT(IsVolatile::value); - STATIC_ASSERT(IsVolatile::value); - STATIC_ASSERT(!IsVolatile::value); - STATIC_ASSERT(!IsVolatile::value); - - STATIC_ASSERT(IsVolatile::value); - STATIC_ASSERT(!IsVolatile::value); - STATIC_ASSERT(!IsVolatile::value); - - STATIC_ASSERT(!IsVolatile::value); - STATIC_ASSERT(IsVolatile::value); - STATIC_ASSERT(IsVolatile::value); - STATIC_ASSERT(IsVolatile::value); -};