Closed fredericomba closed 1 year ago
With the multi-value feature, you don't need the "reserve" or "swap" instruction but rather implement it as a function by yourself.
Changes to wasm must follow this process document, and generally starts as an issue on the WebAssembly/design repository, not in this repository.
We can't break backwards compatibility, so changing stack operand order is a non-starter. However stack manipulation instructions have been actively discussed before.
I think we can close this as a duplicate of https://github.com/WebAssembly/design/issues/1381.
The stack store instructions take arguments like this:
[pointer, value]
. However, if the arguments were in the order[value, pointer]
, it would be easier to use the store instructions with long data structures on the stack. Of course, making this change would break backwards compatibility, so a "reverse" or "swap" instruction that reverses the last two values on the stack could address this.I can't elaborate on this point right now, but if you also faced this, you'll probably know what I'm talking about.