From 016d9d67a7be81c68c6d870b7e7de31c4b4fb468 Mon Sep 17 00:00:00 2001 From: David Wrighton Date: Fri, 22 Nov 2019 13:26:57 -0800 Subject: Non virtual calls to instance methods non-virtual dispatch on instance interface methods (#27756) (#27868) * est for non_virtual_calls_to_instance_methods * Fix handling of callvirt to instance methods on interface types that are not virtual - Use call type to indicate if its non-virtual or not, instead of opcode * Use ilproj to protect against future C# compiler changes - This test needs to test the use of specific opcodes, and so an IL proj is required --- src/vm/jitinterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/vm/jitinterface.cpp b/src/vm/jitinterface.cpp index 2bda507884..f1d41a266e 100644 --- a/src/vm/jitinterface.cpp +++ b/src/vm/jitinterface.cpp @@ -5772,7 +5772,7 @@ void CEEInfo::getCallInfo( pResult->methodFlags = getMethodAttribsInternal(pResult->hMethod); - SignatureKind signatureKind = flags & CORINFO_CALLINFO_CALLVIRT ? SK_VIRTUAL_CALLSITE : SK_CALLSITE; + SignatureKind signatureKind = flags & CORINFO_CALLINFO_CALLVIRT && !(pResult->kind == CORINFO_CALL) ? SK_VIRTUAL_CALLSITE : SK_CALLSITE; getMethodSigInternal(pResult->hMethod, &pResult->sig, (pResult->hMethod == pResolvedToken->hMethod) ? pResolvedToken->hClass : NULL, signatureKind); if (flags & CORINFO_CALLINFO_VERIFICATION) -- cgit v1.2.3