From 532ccdb61a4b7dce9ad1141cef78c4f6be8d2f5a Mon Sep 17 00:00:00 2001 From: Justin King Date: Mon, 2 Jan 2023 14:33:44 +0000 Subject: [PATCH] 8299396: Remove metaprogramming/removeExtent.hpp Reviewed-by: kbarrett, iwalulya, tschatzl --- src/hotspot/share/gc/z/zSafeDelete.hpp | 5 +- .../share/metaprogramming/removeExtent.hpp | 35 ---------- .../metaprogramming/test_removeExtent.cpp | 65 ------------------- 3 files changed, 3 insertions(+), 102 deletions(-) delete mode 100644 src/hotspot/share/metaprogramming/removeExtent.hpp delete mode 100644 test/hotspot/gtest/metaprogramming/test_removeExtent.cpp diff --git a/src/hotspot/share/gc/z/zSafeDelete.hpp b/src/hotspot/share/gc/z/zSafeDelete.hpp index f18d1e4153e..62c3495c57b 100644 --- a/src/hotspot/share/gc/z/zSafeDelete.hpp +++ b/src/hotspot/share/gc/z/zSafeDelete.hpp @@ -26,12 +26,13 @@ #include "gc/z/zArray.hpp" #include "gc/z/zLock.hpp" -#include "metaprogramming/removeExtent.hpp" + +#include template class ZSafeDeleteImpl { private: - typedef typename RemoveExtent::type ItemT; + using ItemT = std::remove_extent_t; ZLock* _lock; uint64_t _enabled; diff --git a/src/hotspot/share/metaprogramming/removeExtent.hpp b/src/hotspot/share/metaprogramming/removeExtent.hpp deleted file mode 100644 index 3f93dd3eeb6..00000000000 --- a/src/hotspot/share/metaprogramming/removeExtent.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2019, 2022, 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_REMOVEEXTENT_HPP -#define SHARE_METAPROGRAMMING_REMOVEEXTENT_HPP - -#include "memory/allStatic.hpp" - -template struct RemoveExtent: AllStatic { typedef T type; }; - -template struct RemoveExtent: AllStatic { typedef T type; }; -template struct RemoveExtent: AllStatic { typedef T type; }; - -#endif // SHARE_METAPROGRAMMING_REMOVEEXTENT_HPP diff --git a/test/hotspot/gtest/metaprogramming/test_removeExtent.cpp b/test/hotspot/gtest/metaprogramming/test_removeExtent.cpp deleted file mode 100644 index 1f6d5e9c478..00000000000 --- a/test/hotspot/gtest/metaprogramming/test_removeExtent.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 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. - * - */ - -#include "precompiled.hpp" -#include "memory/allocation.hpp" -#include "metaprogramming/removeExtent.hpp" -#include "metaprogramming/isSame.hpp" -#include "utilities/debug.hpp" - -class RemoveExtentTest { - class A: AllStatic {}; - - typedef A* Aptr; - typedef A Aarr[]; - typedef A Aarr10[10]; - typedef const A cA; - typedef const A* cAptr; - typedef const A cAarr[]; - typedef const A cAarr10[10]; - - typedef RemoveExtent::type ra_Aptr; - static const bool ra_Aptr_is_Aptr = IsSame::value; - STATIC_ASSERT(ra_Aptr_is_Aptr); - - typedef RemoveExtent::type ra_Aarr; - static const bool ra_Aarr_is_A = IsSame::value; - STATIC_ASSERT(ra_Aarr_is_A); - - typedef RemoveExtent::type ra_Aarr10; - static const bool ra_Aarr10_is_A = IsSame::value; - STATIC_ASSERT(ra_Aarr10_is_A); - - typedef RemoveExtent::type ra_cAptr; - static const bool ra_cAptr_is_cAptr = IsSame::value; - STATIC_ASSERT(ra_cAptr_is_cAptr); - - typedef RemoveExtent::type ra_cAarr; - static const bool ra_cAarr_is_cA = IsSame::value; - STATIC_ASSERT(ra_cAarr_is_cA); - - typedef RemoveExtent::type ra_cAarr10; - static const bool ra_cAarr10_is_cA = IsSame::value; - STATIC_ASSERT(ra_cAarr10_is_cA); -};