4 ms·
Serious answer: The Dart2js compiler could easily take advantage of asm.js additions, and generate javascript code that uses asm.js. If asm.js does take off,
by kyrra 14y ago
Serious answer:
The Dart2js compiler could easily take advantage of asm.js additions, and generate javascript code that uses asm.js. If asm.js does take off, all it can do is help Dart generate faster running code.
Now, if we are talking about the DartVM, asm.js could be used as an argument not to include the DartVM in other browsers. But asm.js is still very much in it's infancy, so we really need to wait and see how it's adopted and how it progresses.
- _jmar777 14y agoThanks, I agree with your comments. I was mostly just trying to poke the bear, though (http://mrale.ph/blog/2013/03/28/why-asmjs-bothers-me.html http://mrale.ph/blog/2013/03/28/why-asmjs-bothers-me.html) :)
- ryeguy 14y agoNo it couldn't. asm.js has no garbage collector. The only way to get dart running on asm.js would be to port the entire VM to asm.js, which afiak won't work since the dart JIT emits machine code at runtime.
- _jmar777 14y agoI don't think @kyrra was suggesting that Dart would compile completely to asm.js code, just parts where it makes sense (just like normal JavaScript uses asm.js only where it makes sense).