News for hackers. Stuff that matters.
Re:JXCore LLVM JavaScript Frontend by a-priori on Wednesday February 12, 2014 @11:59AM (#7225433)
This sounds like the first step in a vision I've had for how the web should evolve. We now have an LLVM frontend for Javascript, so Javascript code can be turned into LLVM bytecode.

The next step would be to swap out the existing Javascript runtimes with this frontend plus a sandboxed backend for the native platform so they can compile Javascript to LLVM bytecode, then to native code.

Finally, you add an extension to the <script> tag to allow loading arbitrary LLVM bytecode, something like <script src="http://some/url/code.llvm" type="text/llvm">.

Once that's in place then you'd be able to execute any language that has an LLVM front end inside the browser environment. Javascript is no longer the sole language of the web, and things like Emscripten and asm.js become obsolete.

Re:JXCore LLVM JavaScript Frontend by chubot on Wednesday February 12, 2014 @12:30PM (#7225714)
In other words, you want to use LLVM as a VM. Sorry to be harsh, but you're only the millionth person to think of this "idea". LLVM is not a well-defined protocol or specification; it's a library for making a compiler that changes with every release. Read:

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

Re:JXCore LLVM JavaScript Frontend by limsup on Wednesday February 12, 2014 @12:57PM (#7225980)
Re:JXCore LLVM JavaScript Frontend by KMag on Wednesday February 12, 2014 @07:37PM (#7228565)
Instead of arbitrary LLVM bitcode, you probably want a subset with some statically verifiable security properties, as a form of very lightweight sandboxing. Google has already created this, and calls it PNaCl.

Running arbitrary LLVM bitcode would make browser exploits trivial, unless you ran the bitcode in a sandboxed subprocess. PNaCl's sandboxing is much lighter weight than requiring IPC to interact with the browser.

EDIT: Just realized this is mostly redundant with another reply, but hopefully gives a bit more detail for those not interested in following links.