Implement %TypedArray%.prototype.slice
authordehrenberg <dehrenberg@chromium.org>
Tue, 9 Jun 2015 19:40:44 +0000 (12:40 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 9 Jun 2015 19:40:56 +0000 (19:40 +0000)
commit51df8df9bef4913559d6a356e26ed2596ba1509f
tree5f16ff0d838f56ffa9f93bcb8ade8cdabff8134d
parenteed7363a0da0f21c3eee6c052507299d9b707462
Implement %TypedArray%.prototype.slice

The initial implementation of this method takes a couple shortcuts:
- At some points in the spec, we should be making a reference to
  "Table 49" and instead do property lookup on the constructor.
  This is an issue with some other TypedArray methods too.
- The spec indicates that, if constructor and @@species haven't been
  messed with in particular ways, then there should be a memcpy
  from the old to the new. That fast path is not implemented here
  in this patch, but because V8 doesn't canonicalize NaN, the result
  isn't observably different.

BUG=v8:3578
LOG=Y
R=arv

Review URL: https://codereview.chromium.org/1170023002

Cr-Commit-Position: refs/heads/master@{#28882}
src/harmony-typedarray.js
test/mjsunit/harmony/typedarray-slice.js [new file with mode: 0644]