-
Notifications
You must be signed in to change notification settings - Fork 696
-
Notifications
You must be signed in to change notification settings - Fork 696
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
Multiple Return Values #937
Comments
We actually already implemented a prototype of this in V8, actually, which was one of the prerequisites to generalizing from the postorder to the stack machine. |
Closing, as this issue is already on the roadmap. |
Would it be appropriate to re-open this and use a tracking label? |
Since it's already on the roadmap, I think the next steps would be to create a spec repo branch adding the feature, tests, etc, but we're still figuring out that whole process. I do think this is something we should get to soon, though. |
Any progress on the process? The issue I filed immediately before this one, #936, is similar but was never closed. If that one is still open, this one should be re-opened. |
I think @titzer closed it because he's pretty sure someone from his team or Mozilla will champion the idea soon. They both have sample implementations in their VM, and we've discussed this quite often over beers, so I expect it to happen in the future. |
Yeah, I will propose it once I'm through with writing the MVP spec. |
@rossberg-chromium I think this issue should be reopened until the MVP spec released |
The MVP design is already out and shipping in some browsers. Multiple return values will need to be proposed to the WebAssembly CG before it can go into the spec. What @rossberg-chromium was saying was "I'm currently working on finishing writing the MVP spec, and a work item I want to tackle after this are multiple return values". There's no hard dependency between the two work items, but there's a soft dependency in @rossberg-chromium 😁 |
bump |
For anybody rediscovering this old issue: multiple return values have been standardised in Wasm by now, the proposal has been merged into the spec as of 2020-04-09 and are implemented in all major engines. |
As noted in the future features document, the stack based nature of WebAssembly lends itself to the possibility of supporting multiple return values from blocks / functions. This would be immediately useful for returning values larger than 8 bytes without having to add extra steps to pass them through a memory area. The binary encoding already leaves open the possibility for multiple return values by simply changing return_count from varint1 to varint32.
The text was updated successfully, but these errors were encountered: