This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Description
(Yeah, I know we're done but I figured it was more natural to file the issue here than in relaxed-simd. Looking for feedback.)
Generally JS does not have a representation for v128 so things become a little awkward; JS can't easily talk about v128 values. But JS can talk about WA.Global objects of type v128, and it can talk about the individual lanes in such an object if accessors were provided. There are a couple of things we could do to make life easier for the JS programmer who interacts with wasm SIMD code:
- provide lane getter and setter methods on WA.Global when the type is v128, we probably should have done this already
- allow WA.Global objects to be passed to exported wasm functions for parameters of type v128 and also make such exported functions return new WA.Global objects when a return type is v128. In effect, WA.Global becomes the JS representation of v128.
(This is based on some work @eqrion is doing for our testing infrastructure, where we rely on a variant of this system, see https://bugzilla.mozilla.org/show_bug.cgi?id=1703105.)