-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
winch(x64): Tail call #9732
Comments
@saulecabrera you can assign me to that 👍 |
Did you have a sketch of a plan on how to implement that already? I did some homework this weekend, trying to find a path toward tail calls. I think we could do something like described in this post about v8 baseline compiler, or as initially implemented in cranelift, basically:
However this is over simplistic. There are many things getting in our way. Here's my understanding of the situation, thus far:
I am glancing over a lot of things here, obviously. My principal concern is with |
Some preliminary context:
-- Regarding the implementation of tail-calls: I don't have a one-size-fits-all answer unfortunately, but we did discuss some
Indeed, there have been attempts in other production ready Wasm The alternative, as you note, is to have the callee clean up any stack space
In either case, I don't think we need to introduce a different calling
In principle nothing fundamental should change for multiple return values in
There are many assumptions in this statement, however, if I'm understanding this -- In general, I agree that resolving how to handle stack arguments is a
After spending some time thinking a bit more about tail calls, and in |
The Wasm Tail Call proposal is considered Tier 1 according to Wasmtime's Tiers of support.
Winch currently doesn't support this proposal.
return_call
return_call_indirect
The text was updated successfully, but these errors were encountered: