tc39 / ecmascript_simd

SIMD numeric type for EcmaScript
Other
544 stars 64 forks source link

Add a `thisSIMDValue()` abstract operation. #339

Open stoklund opened 8 years ago

stoklund commented 8 years ago

Modelled after the existing thisNumberValue(), thisBooleanValue(), ... abstract operations, accept either a primitive SIMD value or a SIMD object wrapping a value. In either case, return the primitive SIMD value.

Use this function in the SIMD constructor prototype methods such that they accept both SIMD objects and primitive values as callees.

This fixes #338.