top | item 42776294

(no title)

frogsRnice | 1 year ago

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

discuss

order

nagaiaida|1 year ago

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

frogsRnice|1 year ago

I guess were talking about optimising tail recursion. Would there be any reason to refer to a tail call other than that optimisation?

I’ll do some reading on the latter part of your post, thank you!