Skip to content

Commit

Permalink
Remove unused declarations from clsload.hpp (dotnet#107509)
Browse files Browse the repository at this point in the history
* Remove unused declarations from clsload.hpp

* also remove unused ClassLoader::TryEnsureLoaded
  • Loading branch information
preeyan committed Sep 8, 2024
1 parent 7d68c7f commit aa418fc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
21 changes: 0 additions & 21 deletions src/coreclr/vm/clsload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
23 changes: 0 additions & 23 deletions src/coreclr/vm/clsload.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -718,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
Expand Down Expand Up @@ -889,24 +883,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.
Expand Down

0 comments on commit aa418fc

Please sign in to comment.