[Public WebGL] Differing TypedArray#set behavior

Oliver Hunt [email protected]
Fri Apr 13 09:13:33 PDT 2012

I looked at our handling in JSC, and assuming similar behaviour in V8 this is likely a bug in the TypedArray implementation in WebKit itself.  The engines already correctly pessimise access :-/


On Apr 13, 2012, at 7:01 AM, Glenn Maynard wrote:

> 2012/4/13 Stéphan Kochen <[email protected]> 
> I was more surprised mixing type was allowed like this, and I suppose it's because it also accepts a plain Array. If it weren't for that, everyone would simply be calling memmove().
> It's not actually like memcpy/memmove, because of the conversion that happens if the types are different.  It's only memmove if the types happen to be the same.
> As an aside, it doesn't seem like the conversion is actually defined, eg. if you set() an Int16Array onto an Int8Array and some values overflow.  I'm not sure where the conversion is defined even for eg. array8[0] = 2000 (somewhere in WebIDL, I assume), but set() should use the same rules.
> -- 
> Glenn Maynard

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20120413/80c320b4/attachment.html>

More information about the public_webgl mailing list