archives

« Bugzilla Issues Index

#4544 — 22.2.1.5: Handle negative zero byteOffset


22.2.1.5 %TypedArray% ( buffer [ , byteOffset [ , length ] ] )

Add after step 9:
---
If offset is -0, let offset be +0.
---

This avoids using a double for the internal representation of typed array's [[ByteOffset]] slot. Implementations tested (Edge, SM, JSC, V8, Nashorn) already convert -0 to +0.


Fixed in ES2016 Draft (2d1ed20).