Hacker News new | ask | show | jobs
by estava 4141 days ago
The thing for now is that the asm.js "family" is riding on LLVM's back. More and more it's the LLVM that is becoming that VM people have longed for. It looks like LLVM is inching towards the JavaScript VM with every year that goes by. I read that Apple is using it for further JavaScript optimizations on the browser. LLVM already powers WebKit underneath right?

So as things stand right now we have 2 popular "VMs" people really use. One is JavaScript since it's going nowhere. And the other is LLVM that is "free as in beer" for companies all over. JavaScript was secluded to the client. And LLVM was secluded to the backend. Now they are going to be marrying and having lots of children. :-)

3 comments

LLVM is not a VM by any stretch of the imagination. It is an intermediate language for compilers whose primary utility is to provide a common target for code generation and optimization. LLVM's name is a misnomer.
This is true, but the comment you were replying to was pretty clearly treating it as a language. With "VM" in scare quotes because it's a semantic model.
You're thinking of that email that someone sent on a mailing list a while back about how LLVM isn't really a bytecode because it includes architecture-specific codes.

It was a stupid email - you can make LLVM into an architecture-agnostic bytecode by disallowing those codes.

Don't believe me?... https://developer.chrome.com/native-client/reference/pnacl-b...

"You're thinking of that email that someone sent on a mailing list a while back about how LLVM isn't really a bytecode because it includes architecture-specific codes."

No, I'm not. In fact, I have no idea what email you're referencing.

LLVM as an intermediate language (I guess you could call it bytecode if you really wanted to) for compilers of arbitrary languages (expressly not a virtual machine!) is the only point I intended to make.

You are probably thinking of this email titled "LLVM IR is a compiler IR".

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

It was not a stupid email. The arguments there are still pretty much correct today.

Now they are going to be marrying and having lots of children. :-)

Here's to hybrid vigor!

So free software/open source is analogous to an open society without any arbitrary marriage restrictions, whereas closed source proprietary software tends to cause aristocratic inbreeding?

I suspect that bastards also fit into the analogy somewhere.

asm.js code doesn't have to be shipped in pure JavaScript form. It could come as byte code that's "uncompiled" into asm.js code before being thrown at the JavaScript runtime.

A smart compiler could recognize the ordering priority and load in chunks sequentially, with hot code rolled in first, less frequently exercised methods last.