News for hackers. Stuff that matters.
Re:Wasm3 compiles itself (using LLVM/Clang compiled to WASM) by glandium on Sunday April 25, 2021 @12:09AM (#26930299)
How do guaranteed tail calls work when you needs to put arguments on the stack, which usually prevents tail call? (and whether a specific call needs to pass arguments on the stack depends on the platform, and the number and type of arguments)
Re:Wasm3 compiles itself (using LLVM/Clang compiled to WASM) by haberman on Sunday April 25, 2021 @12:28AM (#26930353)
The musttail attribute performs several checks to ensure that a tail call can be guaranteed, and rejects the program if these rules are violated. The documentation has the details: https://github.com/llvm/llvm-project/blob/3b8ec86fd576b9808d...

These rules guarantee that the tail call is possible to perform on every platform. They end up being more strict than is necessary on some platforms and calling conventions.