gc
gc copied to clipboard
Can arrays of v128 be used with array.new_canon_data?
Using this validation text from MVP.md:
array.new_canon_data $t $d : [i32 i32] -> [(ref $t)]
iff expand($t) = array (mut t')
and t' is numeric or packed numeric
and $d is a defined data segment
I'm not sure if there's a definition of 'numeric or packed numeric' somewhere. If that's roughly referring to 'numtype' + i8/16 [1], then that would exclude v128.
Is that intentional? From an implementors perspective, if we already support (array v128) it's not much work to support array.new_canon_data with it.
As an aside: I do find it sort of odd to support v128 in structs/arrays as I would normally expect that only be used as a 'register' in SIMD kernels and not long-term GC storage.
[1] https://webassembly.github.io/spec/core/syntax/types.html#syntax-numtype