News for hackers. Stuff that matters.
Re:What asm.js is and isn't by ndesaulniers on Thursday June 20, 2013 @05:03PM (#5914963)
> You might also get a performance increase by just replacing the optimizing compiler wholesale with LLVM?

I can't speak directly to this, but I'm sure if it was worth it, the Spidermonkey and V8 teams would have done it already.

Re:What asm.js is and isn't by azakai on Thursday June 20, 2013 @05:15PM (#5915031)
It is very hard to do, and LLVM has been difficult to use as a JIT in past projects (Unladen Swallow, for example).

However, Apple is experimenting with this in their FTL (fourth tier LLVM-based) JIT project in JSC. Because Apple drives both JSC and LLVM, this has the highest chance of success of any similar project, I believe, so it is very interesting to watch.

Re:What asm.js is and isn't by comex on Thursday June 20, 2013 @05:11PM (#5915014)
I doubt it. Such a replacement would be a huge effort to write (including integrating it with the existing VM) and maintain, and there are also political factors. Despite those, I don't think it's out of the question that it will happen some day, especially as Chrome already has a copy of LLVM, though I do think it's less relevant than the other stuff I mentioned.

edit: azakai has a better answer :)

Re:What asm.js is and isn't by ndesaulniers on Thursday June 20, 2013 @06:24PM (#5915335)
Sure it definitely would be a lot to implement _now_, but llvm was released roughly 5 years before v8. The v8 team totally could have chosen it for a compiler back end (code generation). My observation was simply that they didn't, and I believe there probably was a reason for it (though I can't speak to it).

In hindsight, it probably would've made more sense for Google to utilize llvm as a compiler IR in v8 than as a virtual machine as in PNaCl. [1]

[1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/0437...