logoalt Hacker News

fweimeryesterday at 5:41 PM1 replyview on HN

There are far more cases. Some ABIs use callee-saved registers for parameter-passing under certain circumstances, for example. Usually, there are compatibility restrictions on the signatures of the current and tail-called functions beyond the return type, too.

This is different from Scheme or the MLs (there as a quality-of-implementation feature) where tail calls into arbitrary functions are expected not to lead to space leaks.


Replies

StilesCrisisyesterday at 8:24 PM

Right--if the tailing isn't possible, for any of these varied reasons, it will become a compile error.