From 8d93b240d07145a3737d0fa9cd1a3d55f0bd8240 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 8 Sep 2024 13:52:19 +0100 Subject: [PATCH 1/2] Remove unused declarations from clsload.hpp --- src/coreclr/vm/clsload.hpp | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/coreclr/vm/clsload.hpp b/src/coreclr/vm/clsload.hpp index 95afa2716ec9f..0e599362ad1c8 100644 --- a/src/coreclr/vm/clsload.hpp +++ b/src/coreclr/vm/clsload.hpp @@ -564,11 +564,6 @@ class ClassLoader Module * pLookInThisModuleOnly, Loader::LoadFlag loadFlag); - static PTR_Module ComputeLoaderModuleForCompilation(Module *pDefinitionModule, // the module that declares the generic type or method - mdToken token, - Instantiation classInst, // the type arguments to the type (if any) - Instantiation methodInst); // the type arguments to the method (if any) - public: void Init(AllocMemTracker *pamTracker); @@ -889,24 +884,7 @@ class ClassLoader static void DECLSPEC_NORETURN ThrowTypeLoadException(const TypeKey *pKey, UINT resIDWhy); - - BOOL IsNested(const NameHandle* pName, mdToken *mdEncloser); - static BOOL IsNested(ModuleBase *pModude, mdToken typeDefOrRef, mdToken *mdEncloser); - public: - // Helpers for FindClassModule() - BOOL CompareNestedEntryWithTypeDef(IMDInternalImport *pImport, - mdTypeDef mdCurrent, - EEClassHashTable *pClassHash, - PTR_EEClassHashEntry pEntry); - BOOL CompareNestedEntryWithTypeRef(IMDInternalImport *pImport, - mdTypeRef mdCurrent, - EEClassHashTable *pClassHash, - PTR_EEClassHashEntry pEntry); - BOOL CompareNestedEntryWithExportedType(IMDInternalImport *pImport, - mdExportedType mdCurrent, - EEClassHashTable *pClassHash, - PTR_EEClassHashEntry pEntry); //Attempts to find/load/create a type handle but does not throw // if used in "find" mode. From 1d71e0e3bd6f46fc4c6764275f16d2fc177f4beb Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 8 Sep 2024 17:15:13 +0100 Subject: [PATCH 2/2] also remove unused ClassLoader::TryEnsureLoaded --- src/coreclr/vm/clsload.cpp | 21 --------------------- src/coreclr/vm/clsload.hpp | 1 - 2 files changed, 22 deletions(-) diff --git a/src/coreclr/vm/clsload.cpp b/src/coreclr/vm/clsload.cpp index 0c42ca20161ee..ce23d1e907f31 100644 --- a/src/coreclr/vm/clsload.cpp +++ b/src/coreclr/vm/clsload.cpp @@ -836,27 +836,6 @@ void ClassLoader::EnsureLoaded(TypeHandle typeHnd, ClassLoadLevel level) #endif // DACCESS_COMPILE } -/*static*/ -void ClassLoader::TryEnsureLoaded(TypeHandle typeHnd, ClassLoadLevel level) -{ - WRAPPER_NO_CONTRACT; - -#ifndef DACCESS_COMPILE // Nothing to do for the DAC case - - EX_TRY - { - ClassLoader::EnsureLoaded(typeHnd, level); - } - EX_CATCH - { - // Some type may not load successfully. For eg. generic instantiations - // that do not satisfy the constraints of the type arguments. - } - EX_END_CATCH(RethrowTerminalExceptions); - -#endif // DACCESS_COMPILE -} - /* static */ TypeHandle ClassLoader::LookupTypeKey(const TypeKey *pKey, EETypeHashTable *pTable) { diff --git a/src/coreclr/vm/clsload.hpp b/src/coreclr/vm/clsload.hpp index 0e599362ad1c8..f6cb4f06c0021 100644 --- a/src/coreclr/vm/clsload.hpp +++ b/src/coreclr/vm/clsload.hpp @@ -713,7 +713,6 @@ class ClassLoader BOOL * pfUsesTypeForwarder = NULL); static void EnsureLoaded(TypeHandle typeHnd, ClassLoadLevel level = CLASS_LOADED); - static void TryEnsureLoaded(TypeHandle typeHnd, ClassLoadLevel level = CLASS_LOADED); public: // Look up a class by name