[Mono-dev] correct tail call optimization in mono

Mark Probst mark.probst at gmail.com
Sun Aug 23 16:21:11 EDT 2009


On Sun, Aug 23, 2009 at 10:07 PM, Rodrigo Kumpera<kumpera at gmail.com> wrote:
> Mono doesn't support TCO as well as .NET.
> It's planned to be fixed eventually. The problem is that the  mono team at
> Novell
> doesn't have available manpower to fix this anytime soon.
>
> So, if you do care about F# on mono, please contribute the required fixes
> for the
> JIT to support more broad TCO.

Proper tail calls is not just a more or less simple "fix".  To support
proper tail calls in all scenarios, Mono needs to change its calling
convention to callee-pops-arguments, the reason being that in the
presence of proper tail calls, the caller does not know anymore which
method returns from a call, which means that it also doesn't know how
much argument space it needs to pop.

Mark


More information about the Mono-devel-list mailing list