Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete Module::GetPropertyInfoForMethodDef #98883

Merged
merged 1 commit into from
Feb 24, 2024
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
18 changes: 0 additions & 18 deletions src/coreclr/vm/ceeload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3402,24 +3402,6 @@ MethodDesc *Module::FindMethod(mdToken pMethod)
RETURN pMDRet;
}

//
// GetPropertyInfoForMethodDef wraps the metadata function of the same name.
//

HRESULT Module::GetPropertyInfoForMethodDef(mdMethodDef md, mdProperty *ppd, LPCSTR *pName, ULONG *pSemantic)
{
CONTRACTL
{
INSTANCE_CHECK;
NOTHROW;
GC_NOTRIGGER;
MODE_ANY;
}
CONTRACTL_END;

return GetMDImport()->GetPropertyInfoForMethodDef(md, ppd, pName, pSemantic);
}

// Return true if this module has any live (jitted) JMC functions.
// If a module has no jitted JMC functions, then it's as if it's a
// non-user module.
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/vm/ceeload.h
Original file line number Diff line number Diff line change
Expand Up @@ -1324,8 +1324,6 @@ class Module : public ModuleBase
MethodDesc *FindMethodThrowing(mdToken pMethod);
MethodDesc *FindMethod(mdToken pMethod);

HRESULT GetPropertyInfoForMethodDef(mdMethodDef md, mdProperty *ppd, LPCSTR *pName, ULONG *pSemantic);

public:

// Debugger stuff
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/clrtocomcall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ UINT32 CLRToCOMLateBoundWorker(
ULONG uSemantic;

// See if there is property information for this member.
hr = pItfMT->GetModule()->GetPropertyInfoForMethodDef(pItfMD->GetMemberDef(), &propToken, &strMemberName, &uSemantic);
hr = pItfMT->GetMDImport()->GetPropertyInfoForMethodDef(pItfMD->GetMemberDef(), &propToken, &strMemberName, &uSemantic);
if (hr != S_OK)
{
// Non-property method
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/commtmemberinfomap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ void ComMTMemberInfoMap::GetMethodPropsForMeth(
rProps[ix].bFunction2Getter = FALSE;

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

if (hr == S_OK)
Expand Down
5 changes: 2 additions & 3 deletions src/coreclr/vm/dispatchinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2578,10 +2578,9 @@ bool DispatchInfo::IsPropertyAccessorVisible(bool fIsSetter, OBJECTREF* pMemberI

// Check to see if the new method is a property accessor.
mdToken tkMember = mdTokenNil;
MethodTable *pDeclaringMT = pMDForProperty->GetMethodTable();
if (pMDForProperty->GetModule()->GetPropertyInfoForMethodDef(pMDForProperty->GetMemberDef(), &tkMember, NULL, NULL) == S_OK)
if (pMDForProperty->GetMDImport()->GetPropertyInfoForMethodDef(pMDForProperty->GetMemberDef(), &tkMember, NULL, NULL) == S_OK)
{
if (IsMemberVisibleFromCom(pDeclaringMT, tkMember, pMDForProperty->GetMemberDef()))
if (IsMemberVisibleFromCom(pMDForProperty->GetMethodTable(), tkMember, pMDForProperty->GetMemberDef()))
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/interoputil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2558,7 +2558,7 @@ BOOL IsMethodVisibleFromCom(MethodDesc *pMD)
mdMethodDef md = pMD->GetMemberDef();

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

if (hr == S_OK)
Expand Down