Hacker News new | ask | show | jobs
by javajosh 3386 days ago
Any language that uses LLVM isn't using the language either, by this definition. That would be a shock to most C++, CUDA and Swift developers.
1 comments

How so? LLVM is used to implement language features, performance-hostile ones included. asm.js is a codified way to avoid language features.

You may be confusing layers here. asm.js as a compilation target is used the same way as LLVM- it is used to implement the source language's features, while simultaneously avoiding some of JS's.

I'm sorry, I didn't think I needed to spell it out: LLVM front-end compiles a high-level language into an intermediate representation ("IR") which is then transformed by the backend into machine code. A compiler targeting wasm occupies the same space as the LLVM front-end. Now, in a browser there is not as obvious a back-end, but it's there: it's the JSVM JIT code.
That's not at all relevant.