Any thoughts on whether there could be a JS -> Asm.JS compiler? Might be a handy way to get rid of GC pauses - and maybe even improve performance - for existing JS code.
Or even a JS -> Asm.JS compiler written in JS... so you can feature-detect and enable on demand :)
Yes, you could comple JS to asm.js, but then, unless you change the JS semantics, you'll have to implement a GC, and your GC might have pauses.
Note that an interesting possibility would be to be able to generate asm.js at run-time for a domain-specific language. You could easily implement this as a JS library.
It would be very hard to compile regular JS to asm.js: It would be exactly as hard as compiling regular JS to C, in fact. The problem is you don't know the types of everything.
However, some regular JS might be easy to compile to asm.js. For example a matrix multiplication library.
Or even a JS -> Asm.JS compiler written in JS... so you can feature-detect and enable on demand :)