Re:Asm.js: a strict subset of js for compilers – working draft
by azakai on Friday February 15, 2013 @02:23PM
(#5227947)
This is lower-level. It is JavaScript, but really it is a subset that implements low-level operations. In fact lower than PNaCl, this is past the LLVM IR level.
[ Parent
| on HN ]
Re:Asm.js: a strict subset of js for compilers – working draft
by nnethercote on Friday February 15, 2013 @07:30PM
(#5229710)
I bet if you rewrote the spec to use a different syntax, and didn't mention that it (syntax aside) is a subset of JS, people would be falling over themselves to say "finally, proper bytecode for the web!"
Re:Asm.js: a strict subset of js for compilers – working draft
by dochtman on Friday February 15, 2013 @05:07PM
(#5228964)
So will there be code to turn LLVM IR into asm.js stuff? That would be pretty awesome (and a nice way to make Emscripten more accessible to other languages?).
Re:Asm.js: a strict subset of js for compilers – working draft
by azakai on Saturday February 16, 2013 @03:13AM
(#5230859)
> So will there be code to turn LLVM IR into asm.js stuff?
There already is, that is precisely what emscripten does when run with the ASM_JS=1 flag set. Emscripten's input is LLVM IR, not C or C++. (Although, it has been mostly tested on LLVM IR generated from clang that was given C or C++.)