[Mono-devel-list] tailcall support in mcs
Paolo Molaro
lupus at ximian.com
Mon Sep 15 11:34:59 EDT 2003
On 09/14/03 Michal Moskal wrote:
> Is outputting tallcalls done or planned in mcs? I'm working on
> functional language implementation. I'm generating C# (for now, later
> I'll switch to ilasm or bytecode), so lack of tailcalls is very
> annoying.
The jit will automatically do tail recursion elimination in some cases
(more cases can be easily added). The same code can be extended to do
tail calls. You need to use the -O=tailc option to enable the feature.
Help with implementing and testing the additional cases is welcome.
I don't think adding tail call detection to mcs (or as a feature of the
C# language) is worth it. Hopefully the MS JIT guys will catch up
by the next version and tail call elimination will be a feature of all
the JITs;-)
lupus
--
-----------------------------------------------------------------
lupus at debian.org debian/rules
lupus at ximian.com Monkeys do it better
More information about the Mono-devel-list
mailing list