Skip to content

Commit c7482ad

Browse files
authored
Delete some dead code (#86337)
NGen left overs
1 parent 81d039e commit c7482ad

File tree

3 files changed

+3
-35
lines changed

3 files changed

+3
-35
lines changed

src/coreclr/vm/assembly.cpp

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -961,19 +961,7 @@ Module * Assembly::FindModuleByTypeRef(
961961

962962
void Assembly::CacheManifestExportedTypes(AllocMemTracker *pamTracker)
963963
{
964-
CONTRACT_VOID
965-
{
966-
THROWS;
967-
GC_TRIGGERS;
968-
INJECT_FAULT(COMPlusThrowOM(););
969-
}
970-
CONTRACT_END;
971-
972-
// Prejitted assemblies are expected to have their table prebuilt.
973-
// If not, we do it here at load time (as if we would jit the assembly).
974-
975-
if (m_pModule->IsPersistedObject(m_pModule->m_pAvailableClasses))
976-
RETURN;
964+
STANDARD_VM_CONTRACT;
977965

978966
mdToken mdExportedType;
979967

@@ -987,24 +975,13 @@ void Assembly::CacheManifestExportedTypes(AllocMemTracker *pamTracker)
987975
m_pClassLoader->AddExportedTypeHaveLock(GetModule(),
988976
mdExportedType,
989977
pamTracker);
990-
991-
RETURN;
992978
}
993979

994-
//<TODO>@TODO: if module is not signed it needs to acquire the
995-
//permissions from the assembly.</TODO>
996980
void Assembly::PrepareModuleForAssembly(Module* module, AllocMemTracker *pamTracker)
997981
{
998-
CONTRACTL
999-
{
1000-
THROWS;
1001-
GC_TRIGGERS;
1002-
INJECT_FAULT(COMPlusThrowOM(););
1003-
PRECONDITION(CheckPointer(module));
1004-
}
1005-
CONTRACTL_END;
982+
STANDARD_VM_CONTRACT;
1006983

1007-
if (module->m_pAvailableClasses != NULL && !module->IsPersistedObject(module->m_pAvailableClasses))
984+
if (module->m_pAvailableClasses != NULL)
1008985
{
1009986
// ! We intentionally do not take the AvailableClass lock here. It creates problems at
1010987
// startup and we haven't yet published the module yet so nobody should be searching it.

src/coreclr/vm/ceeload.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -352,12 +352,6 @@ Module::Module(Assembly *pAssembly, PEAssembly *pPEAssembly)
352352
pPEAssembly->AddRef();
353353
}
354354

355-
BOOL Module::IsPersistedObject(void *address)
356-
{
357-
LIMITED_METHOD_CONTRACT;
358-
return FALSE;
359-
}
360-
361355
uint32_t Module::GetNativeMetadataAssemblyCount()
362356
{
363357
if (m_pNativeImage != NULL)

src/coreclr/vm/ceeload.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,9 +1079,6 @@ class Module : public ModuleBase
10791079
// Note that this may require calling into managed code (to resolve security policy).
10801080
BOOL IsSymbolReadingEnabled(void);
10811081

1082-
BOOL IsPersistedObject(void *address);
1083-
1084-
10851082
// Get the in-memory symbol stream for this module, if any.
10861083
// If none, this will return null. This is used by modules loaded in-memory (eg. from a byte-array)
10871084
// and by dynamic modules.

0 commit comments

Comments
 (0)