Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions src/coreclr/vm/methoditer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ BOOL LoadedMethodDescIterator::Next(
{
NOTHROW;
GC_NOTRIGGER;
MODE_PREEMPTIVE;
MODE_ANY;
}
CONTRACTL_END

Expand Down Expand Up @@ -203,15 +203,11 @@ MethodDesc *LoadedMethodDescIterator::Current()
return m_mainMD;
}

MethodTable *pMT = m_typeIteratorEntry->GetTypeHandle().GetMethodTable();
MethodTable *pMT = m_typeIteratorEntry->GetTypeHandle().GetMethodTable()->GetCanonicalMethodTable();
PREFIX_ASSUME(pMT != NULL);
_ASSERTE(pMT);

return pMT->GetMethodDescForSlot(m_mainMD->GetSlot());
return pMT->GetParallelMethodDesc(m_mainMD);
}

// Initialize the iterator. It will cover generics + prejitted;
// but it is not EnC aware.
void
LoadedMethodDescIterator::Start(
AppDomain * pAppDomain,
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/vm/methodtable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8770,6 +8770,7 @@ namespace
GC_NOTRIGGER;
MODE_ANY;
PRECONDITION(pMT != NULL);
PRECONDITION(pMT->IsCanonicalMethodTable());
PRECONDITION(pDefMD != NULL);
PRECONDITION(pDefMD->IsEnCAddedMethod());
PRECONDITION(pDefMD->GetSlot() == MethodTable::NO_SLOT);
Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/vm/runtimehandles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2413,7 +2413,8 @@ FCIMPL2(MethodDesc*, RuntimeMethodHandle::GetMethodFromCanonical, MethodDesc *pM
REFLECTCLASSBASEREF refType = (REFLECTCLASSBASEREF)ObjectToOBJECTREF(pTypeUNSAFE);

TypeHandle instType = refType->GetType();
MethodDesc* pMDescInCanonMT = instType.GetMethodTable()->GetParallelMethodDesc(pMethod);
MethodTable* pCanonMT = instType.GetMethodTable()->GetCanonicalMethodTable();
MethodDesc* pMDescInCanonMT = pCanonMT->GetParallelMethodDesc(pMethod);

return pMDescInCanonMT;
}
Expand Down