Emscripten is nowhere near the complexity of a SelectionDAG-based LLVM backend. In fact Emscripten is mostly written in JavaScript. The only comparatively tricky part is the Relooper, which is just a few pages of code.
"Guys should just get their stuff together and write a reasonable bytecode format for browsers that is fast to read and verify."
A nice-looking bytecode doesn't seem worth the loss of backwards compatibility. The encoding is ugly, but compatibility with existing browsers seems like such a huge win for something that really just amounts to a different encoding.
Emscripten is nowhere near the complexity of a SelectionDAG-based LLVM backend. In fact Emscripten is mostly written in JavaScript. The only comparatively tricky part is the Relooper, which is just a few pages of code.
"Guys should just get their stuff together and write a reasonable bytecode format for browsers that is fast to read and verify."
A nice-looking bytecode doesn't seem worth the loss of backwards compatibility. The encoding is ugly, but compatibility with existing browsers seems like such a huge win for something that really just amounts to a different encoding.
"Would also save quite a bit of transfer."
The effect on download size is minimal actually, compared to native code. And compared to gzipped LLVM bitcode, gzipped asm.js is tiny. http://mozakai.blogspot.com/2011/11/code-size-when-compiling...