logoalt Hacker News

frogsRnice01/21/20251 replyview on HN

Would you not have to use a jump instead of call for it to be a tail call at all- ie otherwise a new frame is created on each call


Replies

nagaiaida01/21/2025

the call is still in tail position whether or not it reuses the stack frame. there are also more involved ways to do tail call optimization than a direct single-jump compilation when you leave ret behind entirely, such as in forth-style threaded interpreters

show 1 reply