From 638836f51f151699773a6f46420d67eefcedfa6b Mon Sep 17 00:00:00 2001 From: Adeel <3840695+am11@users.noreply.github.com> Date: Fri, 3 Dec 2021 06:19:53 +0200 Subject: [PATCH] Apply Egor's patch Co-authored-by: EgorBo --- .../ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs | 1 + src/coreclr/vm/jitinterface.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs index 542565a5128c9..5b78f559030fe 100644 --- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs +++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs @@ -1644,6 +1644,7 @@ private void ceeInfoGetCallInfo( // 3) JIT intrinsics - since they have pre-defined behavior devirt = targetMethod.OwningType.IsValueType || (targetMethod.OwningType.IsDelegate && targetMethod.Name == "Invoke") || + (targetMethod.OwningType.IsObject && targetMethod.Name == "GetType") || (targetMethod.IsIntrinsic && getIntrinsicID(targetMethod, null) != CorInfoIntrinsics.CORINFO_INTRINSIC_Illegal); callVirtCrossingVersionBubble = true; diff --git a/src/coreclr/vm/jitinterface.cpp b/src/coreclr/vm/jitinterface.cpp index 94d7101094891..4fca033ef120f 100644 --- a/src/coreclr/vm/jitinterface.cpp +++ b/src/coreclr/vm/jitinterface.cpp @@ -5007,7 +5007,6 @@ void CEEInfo::getCallInfo( bool directCall = false; bool resolvedCallVirt = false; - bool callVirtCrossingVersionBubble = false; // Delegate targets are always treated as direct calls here. (It would be nice to clean it up...). if (flags & CORINFO_CALLINFO_LDFTN)