You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The WebAssembly multi-value proposal has already been apart of the Wasm finished-proposals for some time, yet I can't find any mention of how to use it in ASC, although Binaryen supports it, and AS is supposed to allow low-level control over the output Wasm, if I'm not mistaken.
Regarding optimization, I checked the wat and noticed that the compiler was emitting two f64 locals, when it could've left the values on the stack, something more like the following:
Tuples themselves don't need to use the multi-value proposal, they could be implemented more like how C variardic functions are
tuples can't only pass as arguments but also should return as result as multiple values. C / C++ use shadow stack for that but Wasm hasn't access to shadow stack, so it usually emulate. But multi-values much more efficient. See this for comparision: https://godbolt.org/z/f9OIcq
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions!
I am currently working on AssemblyScript WebAPI bindgen (.idl -> externref) and interested in multi-value support. According to my old benchmark it was major performance pitfall in AssemblyScript (#997, #1560). Also it seems that it fit to idl-dictionaries because it is literally struct/tuple.
Activity
MaxGraey commentedon Jan 25, 2021
Yes. Will be used for tuples and nullable primitive types like
i32 | null. But currently this not implementedhttps://github.com/AssemblyScript/assemblyscript/wiki/Status-and-Roadmap
MaxGraey commentedon Jan 25, 2021
tuples can't only pass as arguments but also should return as result as multiple values. C / C++ use shadow stack for that but Wasm hasn't access to shadow stack, so it usually emulate. But multi-values much more efficient. See this for comparision:
https://godbolt.org/z/f9OIcq
github-actions commentedon Jun 2, 2021
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in one week if no further activity occurs. Thank you for your contributions!
munrocket commentedon Jan 19, 2022
I am currently working on AssemblyScript WebAPI bindgen (.idl -> externref) and interested in multi-value support. According to my old benchmark it was major performance pitfall in AssemblyScript (#997, #1560). Also it seems that it fit to idl-dictionaries because it is literally struct/tuple.