4 ms·
That's not what backward-compatibility means here. IE6 sees ordinary JavaScript code and executes it. It's true that it can't do the typed-array magic in the ba
by Millennium 14y ago
That's not what backward-compatibility means here. IE6 sees ordinary JavaScript code and executes it. It's true that it can't do the typed-array magic in the background, but it doesn't have to. The JavaScript code that IE6 sees has the same result as compiled asm.js code would; it just does it in a less-optimal way.
That's all that asm.js really is: a set of JavaScript coding conventions that (when followed) prove to be easy to optimize to near-native levels of speed, along with a compiler hint to tell the runtime that these conventions are being used. IE6 doesn't understand the compiler hint, but because the asm.js code is still valid JavaScript, it'll still run.
I suspect that either nnethercote and I are using different definitions of backward-compatibility, or nnethercote is mistaken as to what exactly asm.js is. Authorities are less likely to make mistakes, but they can still make them.
- nnethercote 14y agoTyped arrays are an explicit JS feature: https://developer.mozilla.org/en-US/docs/JavaScript/Typed_arrays https://developer.mozilla.org/en-US/docs/JavaScript/Typed_ar.... There's nothing "background" about them. None of IE 6, 7, 8 and 9 support them: http://caniuse.com/typedarrays http://caniuse.com/typedarrays. Ergo, asm.js won't work on IE 6, 7, 8 or 9. (Speaking of authorities: I got this info from azakai, who's the author of Emscripten and one of the designers of asm.js.)