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:
Separate V128 into simd_type.
Separate SIMD ops and instructions into their own op types and instructions.
Separate SIMD v128. ops from shape-aware ops.
Other tweaks:
Refactor representation of packed SIMD loads/stores to closer match structure of scalar loads.
Refactor representations and handling of assertion result patterns to be more regular.
Refactor printing code for SIMD ops to avoid repitition.
Reorder some code, especially group SIMD instructions together and in same order everywhere.
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:
Separate V128 into simd_type.
Separate SIMD ops and instructions into their own op types and instructions.
Separate SIMD
v128.
ops from shape-aware ops.Other tweaks:
Refactor representation of packed SIMD loads/stores to closer match structure of scalar loads.
Refactor representations and handling of assertion result patterns to be more regular.
Refactor printing code for SIMD ops to avoid repitition.
Reorder some code, especially group SIMD instructions together and in same order everywhere.
Update README with SIMD constructs.
Fix Makefile to handle test subdirs correctly.