Implement %TypedArray%.reverse
authorDaniel Ehrenberg <dehrenberg@chromium.org>
Wed, 20 May 2015 00:38:59 +0000 (17:38 -0700)
committerAdam Klein <adamk@chromium.org>
Wed, 20 May 2015 00:38:49 +0000 (00:38 +0000)
commitcc74268d30074934d7a40dd8256862b45dcbf0d8
tree8e36a08de9c4ff3b9a26930774882aeb7295f1b4
parent65141b68cae2c6dc290489016af4c9185bc2ca71
Implement %TypedArray%.reverse

This patch adds the reverse method to TypedArrays, together with a
test. The test also runs for normal Arrays, since I didn't see a
test for reversing dense arrays.

BUG=v8:3578
LOG=Y
R=arv@chromium.org

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

Patch from Daniel Ehrenberg <dehrenberg@chromium.org>.

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