> instead they would generate it from statically typed languages (TypeScript, Dart, Haxe)
All of those languages would be terrible for targeting asm.js. asm.js doesn't support GC. Java, C#, Haskell, Smalltalk, all sorts of languages you could imagine wanting to compile to run in a browser would actually be a terrible fit for asm.js.
You'd be much better off compiling to vanilla JS so you can take advantage of the underlying VM's support for GC, dynamic dispatch, strings, etc.
Even if it never supports GC, it's not out of the question to use historically GC languages like Java. It's just a matter of manually releasing memory through the API. It's a pain, but it's one i would gladly bear for better performance on some specific methods.
What's the point of writing something in Java if you have to do manual memory management and can't use any of the platform library? asm.js makes sense for performance critical code that you would in other languages write in C. So, in a game you could write your game engine or at least your graphics engine in C/C++ and then add a scripting language for logic (JavaScript/Java/Python/Lua/...). You could compile the engine from C/C++ to asm.js and the game logic to JavaScript. But compiling a classical high(est) level, GC collected language that is mostly defined by its standard lib (read: Java) to asm.js seems weird.
Managing memory in Java is not common, but it's not exactly weird either. Off the top of my head, you need to make memory related API calls for dealing with ORMs, object pools, and native externs.
All of those languages would be terrible for targeting asm.js. asm.js doesn't support GC. Java, C#, Haskell, Smalltalk, all sorts of languages you could imagine wanting to compile to run in a browser would actually be a terrible fit for asm.js.
You'd be much better off compiling to vanilla JS so you can take advantage of the underlying VM's support for GC, dynamic dispatch, strings, etc.