This change prevents jitter from performing tail calls in case the tail call
would require a tailcall helper.
The reason is that we don't have the JIT_TailCall function implemented for Unix
and even if we did, the underlying function to copy the arguments, the
StubLinkerCPU::CreateTailCallCopyArgsThunk, would be difficult to port to Unix due
to the fact that it assumes that va_list is represented as the parameters
being placed in memory one after another while on Unix, it is an opaque structure.
Jan Kotas has recommended to disable this kind of tail calls on Unix and
create a work item to refactor the way these tail calls are implemented.
Besides these Unix specific issues, the current implementation has performance
and maintainability issues, according to Jan Kotas.
// fast calls.
if (!canFastTailCall)
{
+#ifndef FEATURE_PAL
fgMorphTailCall(call);
+#else // FEATURE_PAL
+ goto NO_TAIL_CALL;
+#endif // FEATURE_PAL
}
// Implementation note : If we optimize tailcall to do a direct jump