Skip to content

Commit

Permalink
Align behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorBo committed Jul 2, 2023
1 parent 5958e9e commit 08ac385
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1183,15 +1183,10 @@ private bool getMethodInfo(CORINFO_METHOD_STRUCT_* ftn, CORINFO_METHOD_INFO* inf
{
MethodDesc method = HandleToObject(ftn);

if (context != null && method.IsSharedByGenericInstantiations)
if (context != null && method.IsSharedByGenericInstantiations && context != contextFromMethodBeingCompiled())
{
TypeSystemEntity ctx = entityFromContext(context);
if (ctx is MethodDesc methodFromCtx && context != contextFromMethodBeingCompiled())
{
Debug.Assert(method.GetTypicalMethodDefinition() == methodFromCtx.GetTypicalMethodDefinition());
method = methodFromCtx;
}
else if (ctx is InstantiatedType instantiatedCtxType)
if (ctx is InstantiatedType instantiatedCtxType)
{
MethodDesc methodTypicalDef = method.GetTypicalMethodDefinition();
if (methodTypicalDef.RequiresInstMethodDescArg())
Expand Down

0 comments on commit 08ac385

Please sign in to comment.