← Back to release summary

WebAssembly Tail Call

Category
WebAssembly
Type
New or changed feature
Status
Enabled by default (Chrome 112)
Intent stage
Prepare to ship

Summary

Add an explicit tail call and indirect tail call opcodes to WebAssembly.

Motivation

Adding tail-call instructions to WebAssembly enables new use cases: - the correct and efficient implementations of languages that require tail call elimination - the compilation of control constructs that can be implemented with it (e.g., forms of coroutines, continuations) compilation and optimization techniques that require it (e.g., dynamic recompilation, tracing, CPS) - other sorts of computation being expressed as Wasm functions, e.g., FSMs

Standards & signals

Docs: https://github.com/WebAssembly/tail-call/blob/master/proposals/tail-call/Overview.md

Explainers: https://github.com/WebAssembly/tail-call/blob/main/proposals/tail-call/Overview.md

View on chromestatus.com