WebAssembly / simd

Branch of the spec repo scoped to discussion of SIMD in WebAssembly
Other
531 stars 43 forks source link

Refactor some SIMD code #510

Closed rossberg closed 3 years ago

rossberg commented 3 years ago

I apologise for the large PR! It grew organically and is a bit difficult to disentangle retroactively. Most of the changes are fairly mechanical, though. I hope it's manageable.

This PR refactors some pieces of the interpreter to separate scalar from vector types and ops more thoroughly and make them as regular as possible. That gives rise to fewer "junk" AST configurations (saving cases of assert false), delimits the irregularities of SIMD to SIMD-specific instructions, and will allow easier subsetting in the future. None of the changes should affect the behaviour of the interpreter.

Specifically:

Other tweaks: