Compilers implement tail calls on architectures where you can JMP with impunity. Wasm is not such an architecture - it deals with calls and returns and call stack as concepts.
Trampolines are a hack that penalizes the performance of any language that uses tail calls a lot, like functional languages (scheme, lisp, Haskell, etc).
You could also handle exceptions manually too, without VM support, but that too would incir considerable overhead.
I don't see why. Compilers are how tail calls are literally always implemented. It's not like there's hardware support.
What makes this impossible?
.
> The issue is that to avoid stack blow-up you need the engine to recycle stack frames.
I mean, what's stopping you from just implementing a trampoline?
.
> The problem with this is that in WebAssembly (and JavaScript) the call stack is observable via the .stack property of thrown exceptions.
Okay? This seems fine to me. What makes this a problem?