[m-users.] Tail recursion optimisation

Julien Fischer jfischer at opturion.com
Mon May 18 16:41:12 AEST 2026


On Mon, 18 May 2026 at 16:35, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:
>
> On Mon, 18 May 2026 16:33:32 +1000, Julien Fischer <jfischer at opturion.com> wrote:
> > It is. Those pragmas are currently undocumented however (at least
> > their documentation
> > is currently commented out.)
>
> I have already started enabling that documentation, after fixing it up.

IIRC, the reason it wasn't enabled is that you can specify that lack
of tail recursion
should cause a compilation error.  That fine in production grades,
like asm_fast.gc
or hlc.gc, but it also affects grades that do not support tail
recursion, like the deep
profiling grades (i.e. it needs to be possible to compile programs for
profiling without
having to manually edit all the require_tail_recursion pragmas.)

(Another issue may have been that at the time those pragmas were added, there
was more disparity between the backend over code could be compiled to be
tail recursive.)

Julien.




>
> Zoltan.
>
>


More information about the users mailing list