asm-js / validator

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

Consider allowing x|=0 as a valid Parameter Type Annotation #122

Open srijs opened 8 years ago

srijs commented 8 years ago

Hi!

Uglify.js and other js compressors translate a pattern like x=x|0 into x|=0 because it is one byte shorter. Unfortunately, this breaks asm.js code that is minified with one of those tools.

Regarding to the EcmaScript standard, those two seem to be funtionally equivalent, so I was wondering if it would be possible to make the asm.js spec more lenient by allowing x|=0 to be a valid parameter type annotation?