From 8f756196b430af67a8e31a13811a183d52df8497 Mon Sep 17 00:00:00 2001 From: Ioi Lam Date: Wed, 25 Sep 2024 18:51:16 +0000 Subject: [PATCH] 8340864: Remove unused lines related to vmClasses Reviewed-by: shade, kvn --- src/hotspot/share/classfile/systemDictionary.hpp | 7 ------- src/hotspot/share/classfile/vmClasses.cpp | 10 ---------- src/hotspot/share/classfile/vmClasses.hpp | 4 +--- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/hotspot/share/classfile/systemDictionary.hpp b/src/hotspot/share/classfile/systemDictionary.hpp index ee50aa38dd0..04980291716 100644 --- a/src/hotspot/share/classfile/systemDictionary.hpp +++ b/src/hotspot/share/classfile/systemDictionary.hpp @@ -293,13 +293,6 @@ public: const char* message); static const char* find_nest_host_error(const constantPoolHandle& pool, int which); -protected: - static InstanceKlass* _well_known_klasses[]; - -private: - // table of box klasses (int_klass, etc.) - static InstanceKlass* _box_klasses[T_VOID+1]; - static OopHandle _java_system_loader; static OopHandle _java_platform_loader; diff --git a/src/hotspot/share/classfile/vmClasses.cpp b/src/hotspot/share/classfile/vmClasses.cpp index 0b9b437c67b..b62d699dfe2 100644 --- a/src/hotspot/share/classfile/vmClasses.cpp +++ b/src/hotspot/share/classfile/vmClasses.cpp @@ -45,14 +45,6 @@ InstanceKlass* vmClasses::_klasses[static_cast(vmClassID::LIMIT)] = { nullptr /*, nullptr...*/ }; InstanceKlass* vmClasses::_box_klasses[T_VOID+1] = { nullptr /*, nullptr...*/ }; - -// CDS: scan and relocate all classes referenced by _klasses[]. -void vmClasses::metaspace_pointers_do(MetaspaceClosure* it) { - for (auto id : EnumRange{}) { - it->push(klass_addr_at(id)); - } -} - bool vmClasses::is_loaded(InstanceKlass* klass) { return klass != nullptr && klass->is_loaded(); } @@ -205,8 +197,6 @@ void vmClasses::resolve_all(TRAPS) { _box_klasses[T_SHORT] = vmClasses::Short_klass(); _box_klasses[T_INT] = vmClasses::Integer_klass(); _box_klasses[T_LONG] = vmClasses::Long_klass(); - //_box_klasses[T_OBJECT] = vmClasses::object_klass(); - //_box_klasses[T_ARRAY] = vmClasses::object_klass(); #ifdef ASSERT if (CDSConfig::is_using_archive()) { diff --git a/src/hotspot/share/classfile/vmClasses.hpp b/src/hotspot/share/classfile/vmClasses.hpp index f2b8c5666ee..4fa078c50cd 100644 --- a/src/hotspot/share/classfile/vmClasses.hpp +++ b/src/hotspot/share/classfile/vmClasses.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2021, 2024, 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 @@ -32,7 +32,6 @@ class ClassLoaderData; class InstanceKlass; -class MetaspaceClosure; class vmClasses : AllStatic { friend class VMStructs; @@ -95,7 +94,6 @@ public: return &_klasses[as_int(id)]; } - static void metaspace_pointers_do(MetaspaceClosure* it); static void resolve_all(TRAPS); static BasicType box_klass_type(Klass* k); // inverse of box_klass