Chromium Code Reviews| Index: src/js/array.js |
| diff --git a/src/js/array.js b/src/js/array.js |
| index e80aa8df23757e0fb1bd19463258c07a57a4fb92..2cb2eda9552584a77f02f3f80ce128a4377d78c7 100644 |
| --- a/src/js/array.js |
| +++ b/src/js/array.js |
| @@ -1270,7 +1270,13 @@ function ArrayReduceRight(callback, current) { |
| } |
| -function InnerArrayCopyWithin(target, start, end, array, length) { |
| +// ES6 draft 03-17-15, section 22.1.3.3 |
|
Camillo Bruni
2017/02/15 13:36:28
nit: please use sec reference instead of the (poss
caitp
2017/02/15 13:51:27
Done.
|
| +function ArrayCopyWithin(target, start, end) { |
| + CHECK_OBJECT_COERCIBLE(this, "Array.prototype.copyWithin"); |
| + |
| + var array = TO_OBJECT(this); |
| + var length = TO_LENGTH(array.length); |
| + |
| target = TO_INTEGER(target); |
| var to; |
| if (target < 0) { |
| @@ -1318,17 +1324,6 @@ function InnerArrayCopyWithin(target, start, end, array, length) { |
| } |
| -// ES6 draft 03-17-15, section 22.1.3.3 |
| -function ArrayCopyWithin(target, start, end) { |
| - CHECK_OBJECT_COERCIBLE(this, "Array.prototype.copyWithin"); |
| - |
| - var array = TO_OBJECT(this); |
| - var length = TO_LENGTH(array.length); |
| - |
| - return InnerArrayCopyWithin(target, start, end, array, length); |
| -} |
| - |
| - |
| function InnerArrayFind(predicate, thisArg, array, length) { |
| if (!IS_CALLABLE(predicate)) { |
| throw %make_type_error(kCalledNonCallable, predicate); |
| @@ -1625,7 +1620,6 @@ utils.Export(function(to) { |
| to.ArrayPush = ArrayPush; |
| to.ArrayToString = ArrayToString; |
| to.ArrayValues = IteratorFunctions.values, |
| - to.InnerArrayCopyWithin = InnerArrayCopyWithin; |
| to.InnerArrayEvery = InnerArrayEvery; |
| to.InnerArrayFill = InnerArrayFill; |
| to.InnerArrayFilter = InnerArrayFilter; |