Disabling tail-call optimization

54 views
Skip to first unread message

gmhwxi

unread,
Aug 5, 2015, 9:28:30 AM8/5/15
to ats-lang-users

In ATS/Postiats, a recursive tail-call is compiled into a local jump by default.
One can disable tail-call optimization with the flag '--tlcalopt-disable':

patscc --tlcalopt-disable ...
patsopt --tlcalopt-disable ...

Erlang does its own tail-call optimization. It is a pure functional language and
does not support local jumps. So while compiling ATS to Erlang (vial atscc2erl),
please make sure that you use patscc/patsopt with the flag '--tlcalopt-disable'.

--Hongwei


gmhwxi

unread,
Jul 1, 2016, 1:58:57 PM7/1/16
to ats-lang-users
ATS can now be compiled into Scheme via atscc2scm.

It is mandatory to disable tail-call optimization if the generated
C code is to be fed to atscc2scm.
Reply all
Reply to author
Forward
0 new messages