logoalt Hacker News

fluoridationyesterday at 6:16 PM1 replyview on HN

I can't see why the calling convention could matter. Can you give an example?


Replies

layer8yesterday at 6:53 PM

When the calling convention is such that the caller owns the function arguments, the callee can’t remove/replace them on the stack, but has to keep them across the tail call. In turn, it means that the callee has to clean up the arguments to the tail call, and thus can’t actually make a tail call, unless the argument list happens to be identical to the original call.

show 1 reply