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

Mark forward delegate stubs as not having hidden arguments #62617

Merged
merged 1 commit into from
Dec 10, 2021
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
5 changes: 1 addition & 4 deletions src/coreclr/vm/dllimport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -784,14 +784,11 @@ class ILStubState : public StubState
{
// Struct marshal stubs don't actually call anything so they do not need the secrect parameter.
}
#ifndef HOST_64BIT
else if (SF_IsForwardDelegateStub(m_dwStubFlags))
{
// Forward delegate stubs get all the context they need in 'this' so they
// don't use the secret parameter. Except for AMD64 where we use the secret
// argument to pass the real target to the stub-for-host.
// don't use the secret parameter.
}
#endif // !HOST_64BIT
else
{
// All other IL stubs will need to use the secret parameter.
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/vm/metasig.h
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,6 @@ DEFINE_METASIG_T(IM(Str_BindingFlags_Binder_Obj_ArrObj_ArrParameterModifier_Cult
s g(BINDING_FLAGS) C(BINDER) j a(j) a(g(PARAMETER_MODIFIER)) C(CULTURE_INFO) a(s), j))
DEFINE_METASIG_T(IM(Str_Type_Str_RetVoid, s C(TYPE) s, v))
DEFINE_METASIG_T(SM(Delegate_RetIntPtr, C(DELEGATE), I))
DEFINE_METASIG_T(SM(Delegate_RefIntPtr_RetIntPtr, C(DELEGATE) r(I), I))
DEFINE_METASIG_T(SM(RuntimeTypeHandle_RetType, g(RT_TYPE_HANDLE), C(TYPE)))
DEFINE_METASIG_T(SM(RuntimeTypeHandle_RetIntPtr, g(RT_TYPE_HANDLE), I))
DEFINE_METASIG_T(SM(RuntimeMethodHandle_RetIntPtr, g(METHOD_HANDLE), I))
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/method.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2606,7 +2606,7 @@ class DynamicMethodDesc : public StoredSigMethodDesc
bool HasMDContextArg()
{
LIMITED_METHOD_CONTRACT;
return IsCLRToCOMStub() || IsPInvokeStub();
return IsCLRToCOMStub() || (IsPInvokeStub() && !IsDelegateStub());
}

//
Expand Down