The EE side would like to be able to decide whether to do fat call or not.
CORINFO_SIGFLAG_IS_LOCAL_SIG = 0x01,
CORINFO_SIGFLAG_IL_STUB = 0x02,
CORINFO_SIGFLAG_SUPPRESS_GC_TRANSITION = 0x04,
+ CORINFO_SIGFLAG_FAT_CALL = 0x08,
};
struct CORINFO_SIG_INST
*call->AsCall()->callSig = calliSig;
#endif // DEBUG
- if (IsTargetAbi(CORINFO_CORERT_ABI))
+ if ((sig->flags & CORINFO_SIGFLAG_FAT_CALL) != 0)
{
- bool managedCall = (((calliSig.callConv & CORINFO_CALLCONV_MASK) != CORINFO_CALLCONV_STDCALL) &&
- ((calliSig.callConv & CORINFO_CALLCONV_MASK) != CORINFO_CALLCONV_C) &&
- ((calliSig.callConv & CORINFO_CALLCONV_MASK) != CORINFO_CALLCONV_THISCALL) &&
- ((calliSig.callConv & CORINFO_CALLCONV_MASK) != CORINFO_CALLCONV_FASTCALL));
- if (managedCall)
- {
- addFatPointerCandidate(call->AsCall());
- }
+ addFatPointerCandidate(call->AsCall());
}
}
else // (opcode != CEE_CALLI)
private void findSig(CORINFO_MODULE_STRUCT_* module, uint sigTOK, CORINFO_CONTEXT_STRUCT* context, CORINFO_SIG_INFO* sig)
{
var methodIL = (MethodIL)HandleToObject((IntPtr)module);
- Get_CORINFO_SIG_INFO((MethodSignature)methodIL.GetObject((int)sigTOK), sig);
+ var methodSig = (MethodSignature)methodIL.GetObject((int)sigTOK);
+ Get_CORINFO_SIG_INFO(methodSig, sig);
+
+#if !READYTORUN
+ // Check whether we need to report this as a fat pointer call
+ if (_compilation.IsFatPointerCandidate(methodIL.OwningMethod, methodSig))
+ {
+ sig->flags |= CorInfoSigInfoFlags.CORINFO_SIGFLAG_FAT_CALL;
+ }
+#endif
}
private void findCallSiteSig(CORINFO_MODULE_STRUCT_* module, uint methTOK, CORINFO_CONTEXT_STRUCT* context, CORINFO_SIG_INFO* sig)
CORINFO_SIGFLAG_IS_LOCAL_SIG = 0x01,
CORINFO_SIGFLAG_IL_STUB = 0x02,
CORINFO_SIGFLAG_SUPPRESS_GC_TRANSITION = 0x04,
+ CORINFO_SIGFLAG_FAT_CALL = 0x08,
};
// These are returned from getMethodOptions