typed array strawman proposal
brendan at mozilla.com
Wed Jan 27 10:46:55 PST 2010
On Jan 27, 2010, at 10:41 AM, Brendan Eich wrote:
> Only native code can do this currently, whether generated by a C++
> compiler or even a crazy pattern-matching compiler that tries to
> recognize bitwise ops clamping doubles stored in JS Arrays. The
> latter, besides being crazy, does not prevent the doubles from
> leaking, and again it is not something the spec should cater to, let
> alone mandate.
To avoid confusion, I mean "leak" as in "abstraction leak", not
So long as some crazy JIT pattern matches clichés involving bitwise
ops before stores and after loads involving certain Array instances
(ahem, TraceMonkey does a bit of this for crypto code clichés), you
could argue that you can desugar ("sour") to closures plus bitwise ops
and plain old Arrays. But as noted, nothing guarantees that someone
won't write double into such an Array, and read it back.
This rules out such implementations as conforming to any spec such as
the WebGL "typed arrays" spec. We cannot allow such abstraction leaks.
More information about the es-discuss