Are you proposing a JS to JS filter that
a) checks if functions/modules are eligible for asm-ifying (that is, it only uses asm.js functionality, no metaprogramming, only using asm.js "heap", do I oversee something?) b) adds a "use asm" to the function/module c) adds the correct type information d) perhaps compiles some JS functionality into asm.js (I'm thinking of the heap, which could be precompiled under certain constraints, but it's probably better to make the compiler not too smart)