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
7 changes: 0 additions & 7 deletions src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2128,13 +2128,6 @@ private static bool HasCallableAsyncVariant(MethodDesc method)
return false;
}

// Don't get async variant of ComImport methods since we do not
// generate any runtime async entry points for them.
if (method.OwningType.IsComImport)
{
return false;
}

return true;
}

Expand Down
6 changes: 2 additions & 4 deletions src/coreclr/vm/jitinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1084,9 +1084,7 @@ void CEEInfo::resolveToken(/* IN, OUT */ CORINFO_RESOLVED_TOKEN * pResolvedToken
// in rare cases a method that returns Task is not actually TaskReturning (i.e. returns T).
// we cannot resolve to an Async variant in such case.
// return NULL, so that caller would re-resolve as a regular method call
// For COM-import interface calls we do not have an async variant of the COM interop stub, and
// in any case there would be no benefit of creating one.
pMD = pMD->ReturnsTaskOrValueTask() && !pMD->GetClass()->IsComImport() ? pMD->GetAsyncVariant(/*allowInstParam*/FALSE) : NULL;
pMD = pMD->ReturnsTaskOrValueTask() ? pMD->GetAsyncVariant(/*allowInstParam*/FALSE) : NULL;
}
break;

Expand Down Expand Up @@ -9081,7 +9079,7 @@ CORINFO_METHOD_HANDLE CEEInfo::getAsyncOtherVariant(
MethodDesc* pMD = GetMethod(ftn);
MethodDesc* pAsyncOtherVariant = NULL;

if (pMD->ReturnsTaskOrValueTask() && !pMD->GetClass()->IsComImport())
if (pMD->ReturnsTaskOrValueTask())
{
pAsyncOtherVariant = pMD->GetAsyncVariant();
}
Expand Down
Loading