binaryen
binaryen copied to clipboard
[WIP][multibyte] Add multibyte array store instructions.
Prototype implementation of the new multibyte array proposal that reuses the existing memory instructions.
The syntax for the new instructions is as follows:
<i32|i64|f32|f64>.store type=array
Some spec related TODOs:
- Decide on new instructions vs existing memory instructions with memarg flag.
- If using existing instructions:
- What does the wat syntax look like? e.g.
i32.store type=array x yori32.store array x yor ??? - Do we support immediate offsets? - Do we support i32.store8? (effectively the same as array.set on i8)
- What does the wat syntax look like? e.g.
- Do we support atomic instructions?
Some implementation TODOs:
- Add feature flag.
- Add v128.store.
- Go through the various
visitArrayStorefunctions and implement them or make sure the copied versions makes sense. - Add fuzzing support.
- Make it so there's only one
WasmBinaryReader::getMemarg - Add JS API