asm-js / validator

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

Constant expressions #93

Closed Ginden closed 6 years ago

Ginden commented 9 years ago

asm.js should allow compile-time expressions like:

var a = foreign.a|0;
var b = foreign.b|0;
var c = (a*b)|0;
var d = 3*5;
var e = imul(3,2);
hikari-no-yume commented 9 years ago

What's the benefit of this? Isn't this only really helpful for hand-written code?