[Mono-list] Mono does not have tail calls?

Jon Harrop jon at ffconsultancy.com
Mon Feb 2 13:46:02 EST 2009

On Monday 02 February 2009 18:17:21 Paolo Molaro wrote:
> On 01/31/09 Jon Harrop wrote:
> > I had long since held the belief that Mono supports tail calls but when I
> > recently came to actually test that I discovered that Mono does not, in
> > fact, have tail calls.
> >
> > Specifically, I ran the following simple test code:
> >
> >   let even odd n = odd(n+1)
> Please post the generated IL code in a bug report.
> We have a similar test in tests/even-odd.il and it has been working for
> years in mono.

Your test uses only mutual tail recursion and not general tail calls because 
your branch locations are static.

Dr Jon Harrop, Flying Frog Consultancy Ltd.

More information about the Mono-list mailing list