| Index: src/js/typedarray.js
|
| diff --git a/src/js/typedarray.js b/src/js/typedarray.js
|
| index 7df43779197a8dcb4dabdc1a82bc1212436fff29..5fa6b67f892db4fb565dcb6963ca8b292cc857fe 100644
|
| --- a/src/js/typedarray.js
|
| +++ b/src/js/typedarray.js
|
| @@ -530,25 +530,6 @@ function TypedArrayReverse() {
|
| return PackedArrayReverse(this, length);
|
| }
|
|
|
| -
|
| -function TypedArrayComparefn(x, y) {
|
| - if (x === 0 && x === y) {
|
| - x = 1 / x;
|
| - y = 1 / y;
|
| - }
|
| - if (x < y) {
|
| - return -1;
|
| - } else if (x > y) {
|
| - return 1;
|
| - } else if (NUMBER_IS_NAN(x) && NUMBER_IS_NAN(y)) {
|
| - return NUMBER_IS_NAN(y) ? 0 : 1;
|
| - } else if (NUMBER_IS_NAN(x)) {
|
| - return 1;
|
| - }
|
| - return 0;
|
| -}
|
| -
|
| -
|
| // ES6 draft 05-18-15, section 22.2.3.25
|
| function TypedArraySort(comparefn) {
|
| if (!IS_TYPEDARRAY(this)) throw %make_type_error(kNotTypedArray);
|
| @@ -556,7 +537,7 @@ function TypedArraySort(comparefn) {
|
| var length = %_TypedArrayGetLength(this);
|
|
|
| if (IS_UNDEFINED(comparefn)) {
|
| - comparefn = TypedArrayComparefn;
|
| + return %TypedArraySortFast(this);
|
| }
|
|
|
| return InnerArraySort(this, length, comparefn);
|
|
|