[m-dev.] Mutually recursive tailcalls in hlc.
jfischer at opturion.com
Mon Nov 9 10:47:13 AEDT 2015
On Sat, 7 Nov 2015, Mark Brown wrote:
> On Sat, Nov 7, 2015 at 1:25 PM, Zoltan Somogyi
> <zoltan.somogyi at runbox.com> wrote:
>> On Sat, 7 Nov 2015 06:06:21 +1100, Mark Brown <mark at mercurylang.org> wrote:
>>> Come to think of it, could you meet gcc's criteria by just
>>> padding out the functions in the SCC so they all have the same number
>>> of arguments?
>> Two functions with the same number of arguments may still have
>> different stack frame sizes,
> Yes, I know. I think Paul may be mistaken about gcc's criteria,
> however: "the compiler considers two functions as being siblings if
> they share the same structural equivalence of return types, as well as
> matching space requirements of their arguments" . That should be
> easier to satisfy than having the same stack size (I haven't tried it
Note that we support C compilers other than GCC; I would only want to
rely on the C compiler optimising mutual recursion if such a thing is
*well* supported by the other C compilers.
More information about the developers