Skip to content

Commit 7b54246

Browse files
authored
Delete Module::GetPropertyInfoForMethodDef (#98883)
Left over from the time where Module had cache for this method
1 parent 99a7964 commit 7b54246

6 files changed

+5
-26
lines changed

src/coreclr/vm/ceeload.cpp

-18
Original file line numberDiff line numberDiff line change
@@ -3402,24 +3402,6 @@ MethodDesc *Module::FindMethod(mdToken pMethod)
34023402
RETURN pMDRet;
34033403
}
34043404

3405-
//
3406-
// GetPropertyInfoForMethodDef wraps the metadata function of the same name.
3407-
//
3408-
3409-
HRESULT Module::GetPropertyInfoForMethodDef(mdMethodDef md, mdProperty *ppd, LPCSTR *pName, ULONG *pSemantic)
3410-
{
3411-
CONTRACTL
3412-
{
3413-
INSTANCE_CHECK;
3414-
NOTHROW;
3415-
GC_NOTRIGGER;
3416-
MODE_ANY;
3417-
}
3418-
CONTRACTL_END;
3419-
3420-
return GetMDImport()->GetPropertyInfoForMethodDef(md, ppd, pName, pSemantic);
3421-
}
3422-
34233405
// Return true if this module has any live (jitted) JMC functions.
34243406
// If a module has no jitted JMC functions, then it's as if it's a
34253407
// non-user module.

src/coreclr/vm/ceeload.h

-2
Original file line numberDiff line numberDiff line change
@@ -1324,8 +1324,6 @@ class Module : public ModuleBase
13241324
MethodDesc *FindMethodThrowing(mdToken pMethod);
13251325
MethodDesc *FindMethod(mdToken pMethod);
13261326

1327-
HRESULT GetPropertyInfoForMethodDef(mdMethodDef md, mdProperty *ppd, LPCSTR *pName, ULONG *pSemantic);
1328-
13291327
public:
13301328

13311329
// Debugger stuff

src/coreclr/vm/clrtocomcall.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ UINT32 CLRToCOMLateBoundWorker(
505505
ULONG uSemantic;
506506

507507
// See if there is property information for this member.
508-
hr = pItfMT->GetModule()->GetPropertyInfoForMethodDef(pItfMD->GetMemberDef(), &propToken, &strMemberName, &uSemantic);
508+
hr = pItfMT->GetMDImport()->GetPropertyInfoForMethodDef(pItfMD->GetMemberDef(), &propToken, &strMemberName, &uSemantic);
509509
if (hr != S_OK)
510510
{
511511
// Non-property method

src/coreclr/vm/commtmemberinfomap.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ void ComMTMemberInfoMap::GetMethodPropsForMeth(
689689
rProps[ix].bFunction2Getter = FALSE;
690690

691691
// See if there is property information for this member.
692-
hr = pMeth->GetModule()->GetPropertyInfoForMethodDef(pMeth->GetMemberDef(), &pd, &pPropName, &uSemantic);
692+
hr = pMeth->GetMDImport()->GetPropertyInfoForMethodDef(pMeth->GetMemberDef(), &pd, &pPropName, &uSemantic);
693693
IfFailThrow(hr);
694694

695695
if (hr == S_OK)

src/coreclr/vm/dispatchinfo.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -2578,10 +2578,9 @@ bool DispatchInfo::IsPropertyAccessorVisible(bool fIsSetter, OBJECTREF* pMemberI
25782578

25792579
// Check to see if the new method is a property accessor.
25802580
mdToken tkMember = mdTokenNil;
2581-
MethodTable *pDeclaringMT = pMDForProperty->GetMethodTable();
2582-
if (pMDForProperty->GetModule()->GetPropertyInfoForMethodDef(pMDForProperty->GetMemberDef(), &tkMember, NULL, NULL) == S_OK)
2581+
if (pMDForProperty->GetMDImport()->GetPropertyInfoForMethodDef(pMDForProperty->GetMemberDef(), &tkMember, NULL, NULL) == S_OK)
25832582
{
2584-
if (IsMemberVisibleFromCom(pDeclaringMT, tkMember, pMDForProperty->GetMemberDef()))
2583+
if (IsMemberVisibleFromCom(pMDForProperty->GetMethodTable(), tkMember, pMDForProperty->GetMemberDef()))
25852584
return true;
25862585
}
25872586
}

src/coreclr/vm/interoputil.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2558,7 +2558,7 @@ BOOL IsMethodVisibleFromCom(MethodDesc *pMD)
25582558
mdMethodDef md = pMD->GetMemberDef();
25592559

25602560
// See if there is property information for this member.
2561-
hr = pMD->GetModule()->GetPropertyInfoForMethodDef(md, &pd, &pPropName, &uSemantic);
2561+
hr = pMD->GetMDImport()->GetPropertyInfoForMethodDef(md, &pd, &pPropName, &uSemantic);
25622562
IfFailThrow(hr);
25632563

25642564
if (hr == S_OK)

0 commit comments

Comments
 (0)