diff --git a/src/hotspot/share/metaprogramming/isFloatingPoint.hpp b/src/hotspot/share/metaprogramming/isFloatingPoint.hpp deleted file mode 100644 index cbc2d838fe603..0000000000000 --- a/src/hotspot/share/metaprogramming/isFloatingPoint.hpp +++ /dev/null @@ -1,50 +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_ISFLOATINGPOINT_HPP -#define SHARE_METAPROGRAMMING_ISFLOATINGPOINT_HPP - -#include "metaprogramming/integralConstant.hpp" - -// This metafunction returns true iff the type T (irrespective of CV qualifiers) -// is a floating point type. - -template struct IsFloatingPoint: public FalseType {}; - -template <> struct IsFloatingPoint: public TrueType {}; -template <> struct IsFloatingPoint: public TrueType {}; -template <> struct IsFloatingPoint: public TrueType {}; -template <> struct IsFloatingPoint: public TrueType {}; - -template <> struct IsFloatingPoint: public TrueType {}; -template <> struct IsFloatingPoint: public TrueType {}; -template <> struct IsFloatingPoint: public TrueType {}; -template <> struct IsFloatingPoint: public TrueType {}; - -template <> struct IsFloatingPoint: public TrueType {}; -template <> struct IsFloatingPoint: public TrueType {}; -template <> struct IsFloatingPoint: public TrueType {}; -template <> struct IsFloatingPoint: public TrueType {}; - -#endif // SHARE_METAPROGRAMMING_ISFLOATINGPOINT_HPP diff --git a/src/hotspot/share/oops/accessBackend.hpp b/src/hotspot/share/oops/accessBackend.hpp index 3bcfe797e0c34..c17f16677ea14 100644 --- a/src/hotspot/share/oops/accessBackend.hpp +++ b/src/hotspot/share/oops/accessBackend.hpp @@ -31,7 +31,6 @@ #include "metaprogramming/decay.hpp" #include "metaprogramming/enableIf.hpp" #include "metaprogramming/integralConstant.hpp" -#include "metaprogramming/isFloatingPoint.hpp" #include "metaprogramming/isIntegral.hpp" #include "metaprogramming/isPointer.hpp" #include "metaprogramming/isSame.hpp" @@ -42,6 +41,7 @@ #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. @@ -1097,7 +1097,7 @@ namespace AccessInternal { // not recognized as a valid primitive type to a primitive Access function. STATIC_ASSERT((HasDecorator::value || // oops have already been validated (IsPointer::value || IsIntegral::value) || - IsFloatingPoint::value)); // not allowed primitive type + std::is_floating_point::value)); // not allowed primitive type } template @@ -1217,7 +1217,7 @@ namespace AccessInternal { size_t length) { STATIC_ASSERT((HasDecorator::value || (IsSame::value || IsIntegral::value) || - IsFloatingPoint::value)); // arraycopy allows type erased void elements + std::is_floating_point::value)); // arraycopy allows type erased void elements typedef typename Decay::type DecayedT; const DecoratorSet expanded_decorators = DecoratorFixup::value; return arraycopy_reduce_types(src_obj, src_offset_in_bytes, const_cast(src_raw), diff --git a/test/hotspot/gtest/metaprogramming/test_isFloatingPoint.cpp b/test/hotspot/gtest/metaprogramming/test_isFloatingPoint.cpp deleted file mode 100644 index 789dae1d1a904..0000000000000 --- a/test/hotspot/gtest/metaprogramming/test_isFloatingPoint.cpp +++ /dev/null @@ -1,45 +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/isFloatingPoint.hpp" -#include "utilities/debug.hpp" - -class IsFloatingPointTest: AllStatic { - STATIC_ASSERT(IsFloatingPoint::value); - STATIC_ASSERT(IsFloatingPoint::value); - STATIC_ASSERT(IsFloatingPoint::value); - - STATIC_ASSERT(IsFloatingPoint::value); - STATIC_ASSERT(!IsFloatingPoint::value); - - STATIC_ASSERT(!IsFloatingPoint::value); - STATIC_ASSERT(!IsFloatingPoint::value); - STATIC_ASSERT(!IsFloatingPoint::value); - - class A: AllStatic {}; - STATIC_ASSERT(!IsFloatingPoint::value); - STATIC_ASSERT(!IsFloatingPoint::value); -};