There do not appear to be any ninjas here. But after looking around, you discover a note on the ground, which reads:

Look at the generated IL.

(In a future version of the language, we may add source code annotations which mean 'I intend for this to be a tail call; compiler, please issue an error if it is not'.)

In general, if tail calls are enabled (no "--tailcalls-" on the command-line), then the compiler should

- translate every directly recursive tail call into a loop

- translate every other tail call into a ".tail" instruction in the IL

Unfortunately the latter bullet can be hard to identify 'by eye' in a number of corner cases.

By on 4/22/2010 8:10 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper