ecmascript_simd
ecmascript_simd copied to clipboard
Coerce lane indexes with ToNumber().
SIMD functions that take a lane index (extractLane, replaceLane, swizzle, shuffle) should use ToNumber() to coerce the lane index to a number before checking that the index is an integer in range.
This behavior corresponds to the SIMDToLane() function in the SIMD.js specification.
This fixes issues #319 and #237.
I think you meant #329 instead of 319, right?
Oops, you are right. Fixed.
Thanks, Peter. I found another mistake in the validLaneIndex() function.