[Mono-devel-list] tailcall support in mcs

Michal Moskal malekith at pld-linux.org
Mon Sep 15 04:32:24 EDT 2003

On Mon, Sep 15, 2003 at 01:00:18PM +1000, Lloyd Dupont wrote:
> ho, I see, thanks for that explanation :-)
> If I understand you it's something the user (developer) will never see as it
> will done behind the scene by the compiler, is it ?

You won't see if it's done or not, unless you relay on it and are hit by
stack overflow. CIL support tail calls. I believe tail calls can improve
performance of C# too (basically you can use tail call when you do
"return some_other_function(...);" in C#).

Maybe I'm wrong but can the JIT enginge optimize sequence of

call foo  // or callvirt


tail.call foo ?

That would fix the problem even better then mcs emitting tail calls.

: Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv
: When in doubt, use brute force. -- Ken Thompson : {E-,w}-- {b++,e}>+++ h

More information about the Mono-devel-list mailing list