← Back to context

Comment by KMag

5 years ago

> There isn't any information in the stack anyway, by definition.

This is untrue. There are 3 possibilities:

  1. Constant stack space (perhaps zero) across calls with caller-cleanup
  2. Callee-cleanup
  3. Caller-cleanup where an argument indicates how much stack space to clean/where to set the stack pointer

If you what you say is true, it still doesn't survive N+1 invocations, we are talking about 1,2,3 vs infinity.

My statement still stands, there is _next to no_ information in the call stack of TCO enabled functions. Which is by design.