-
Couldn't load subscription status.
- Fork 96
Description
Continuing the discussion on Slack.
Here's a list of proposal that we mentioned.
Sign-extension operators
This impacts the wasm format and type-checker (validation), new instructions needs to be parsed/emitted and checked.
Multi-value
We can simulate multiple returns values using registers (globals). The transformation itself sounds trivial, but it may have some side effects. Our wast-parser and the typechecker should already work.
More information https://blog.scottlogic.com/2018/05/29/transpiling-webassembly.html
Import/Export of Mutable Globals
This is what is done in Webpack, we don't allow importing globals from JS. The transformation removes the imports and emit "managed" mutable globals instead.
While we can expect compiler to emit such code at the moment, we can do a smaller transformation in Webpack.
cc @xtuc
Other ideas
- I64 lower to i32, i32?