asm-js / validator

A reference validator for asm.js.
Apache License 2.0
1.78k stars 154 forks source link

allow stdlib Math functions to be called without call coercions #92

Closed ghost closed 9 years ago

ghost commented 9 years ago

The type of a Math stdlib functions is determined by its name (and possibly, in the case of overloaded types, by the types of its arguments). The only reason they must be coerced now is b/c there is only one call validation rule. With SIMD operations, these technically-redundant callsite coercions become a lot more burdensome:

float32x4(float32x4_add(x, y));

If we loosen the rules for all stdlib functions, then we can avoid the above callsite coercion. This change should be backwards compatible.

ghost commented 9 years ago

See also https://bugzilla.mozilla.org/show_bug.cgi?id=1052325