Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm][post-MVP] tailcall proposal in .NET #94352

Open
lambdageek opened this issue Nov 3, 2023 · 1 comment
Open

[wasm][post-MVP] tailcall proposal in .NET #94352

lambdageek opened this issue Nov 3, 2023 · 1 comment
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono
Milestone

Comments

@lambdageek
Copy link
Member

This issue tracks the support for the WebAssembly post-MVP tailcall proposal in .NET.

See #94351 for a summary of other WebAssembly proposals and their status.

Proposal

Repo: https://github.com/WebAssembly/tail-call

Explainer or overview: https://github.com/WebAssembly/tail-call/blob/main/proposals/tail-call/Overview.md

.NET Scenarios and User Stories

F# logic in a .NET WebAssembly app

As an F# developer, I would like to use tail-recursive functions in my library code that is used by a .NET WebAssembly application without overflowing the stack. My code is performance sensitive and I would like to utilize Just-in-Time or Ahead-of-Time compilation.

AOT

We need LLVM support for tailcalls in WASM.

Interpreter / jiterpreter

The interpreter already does not recuse in C when a .NET function is called (it managed its own stack of activation frames). It already has specialized tailcall opcodes.

The jiterpreter currently bails on traces that include function calls (tailcalls included).

Libraries / Tooling / Diagnostics

N/A

Upstream dependencies: engines and toolchain

Required WebAssembly engine support

Expected .NET targets or supported configurations: Desktop browsers + Mobile browsers + Node + WASI

Engine Status
Chrome ?
Firefox ?
Safari ?
Node ?
wasmtime ?

Required WebAssembly toolchain support

We need LLVM to support this for AOT.

@lambdageek lambdageek added arch-wasm WebAssembly architecture area-Codegen-AOT-mono labels Nov 3, 2023
@lambdageek lambdageek added this to the Future milestone Nov 3, 2023
@ghost
Copy link

ghost commented Nov 3, 2023

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

This issue tracks the support for the WebAssembly post-MVP tailcall proposal in .NET.

See #94351 for a summary of other WebAssembly proposals and their status.

Proposal

Repo: https://github.com/WebAssembly/tail-call

Explainer or overview: https://github.com/WebAssembly/tail-call/blob/main/proposals/tail-call/Overview.md

.NET Scenarios and User Stories

F# logic in a .NET WebAssembly app

As an F# developer, I would like to use tail-recursive functions in my library code that is used by a .NET WebAssembly application without overflowing the stack. My code is performance sensitive and I would like to utilize Just-in-Time or Ahead-of-Time compilation.

AOT

We need LLVM support for tailcalls in WASM.

Interpreter / jiterpreter

The interpreter already does not recuse in C when a .NET function is called (it managed its own stack of activation frames). It already has specialized tailcall opcodes.

The jiterpreter currently bails on traces that include function calls (tailcalls included).

Libraries / Tooling / Diagnostics

N/A

Upstream dependencies: engines and toolchain

Required WebAssembly engine support

Expected .NET targets or supported configurations: Desktop browsers + Mobile browsers + Node + WASI

Engine Status
Chrome ?
Firefox ?
Safari ?
Node ?
wasmtime ?

Required WebAssembly toolchain support

We need LLVM to support this for AOT.

Author: lambdageek
Assignees: -
Labels:

arch-wasm, area-Codegen-AOT-mono

Milestone: Future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Codegen-AOT-mono
Projects
None yet
Development

No branches or pull requests

1 participant