| Index: src/harmony-typedarray.js
|
| diff --git a/src/harmony-typedarray.js b/src/harmony-typedarray.js
|
| index c33e08b93ce3bcee4aa04429e407024fb4c04b07..3c4c4a40fedd69f97bc46813fd624edcf3f93f7b 100644
|
| --- a/src/harmony-typedarray.js
|
| +++ b/src/harmony-typedarray.js
|
| @@ -59,6 +59,37 @@ function TypedArrayForEach(f, receiver) {
|
| }
|
| %FunctionSetLength(TypedArrayForEach, 1);
|
|
|
| +// ES6 draft 04-05-14 section 22.2.3.8
|
| +function TypedArrayFill(value, start , end) {
|
| + if (!%IsTypedArray(this)) throw MakeTypeError(kNotTypedArray);
|
| +
|
| + var length = %_TypedArrayGetLength(this);
|
| +
|
| + return $innerArrayFill(value, start, end, this, length);
|
| +}
|
| +%FunctionSetLength(TypedArrayFill, 1);
|
| +
|
| +// ES6 draft 07-15-13, section 22.2.3.10
|
| +function TypedArrayFind(predicate, thisArg) {
|
| + if (!%IsTypedArray(this)) throw MakeTypeError(kNotTypedArray);
|
| +
|
| + var length = %_TypedArrayGetLength(this);
|
| +
|
| + return $innerArrayFind(predicate, thisArg, this, length);
|
| +}
|
| +%FunctionSetLength(TypedArrayFind, 1);
|
| +
|
| +// ES6 draft 07-15-13, section 22.2.3.11
|
| +function TypedArrayFindIndex(predicate, thisArg) {
|
| + if (!%IsTypedArray(this)) throw MakeTypeError(kNotTypedArray);
|
| +
|
| + var length = %_TypedArrayGetLength(this);
|
| +
|
| + return $innerArrayFindIndex(predicate, thisArg, this, length);
|
| +}
|
| +%FunctionSetLength(TypedArrayFindIndex, 1);
|
| +
|
| +
|
| // ES6 draft 08-24-14, section 22.2.2.2
|
| function TypedArrayOf() {
|
| var length = %_ArgumentsLength();
|
| @@ -79,7 +110,10 @@ macro EXTEND_TYPED_ARRAY(NAME)
|
| $installFunctions(GlobalNAME.prototype, DONT_ENUM, [
|
| "copyWithin", TypedArrayCopyWithin,
|
| "every", TypedArrayEvery,
|
| - "forEach", TypedArrayForEach
|
| + "forEach", TypedArrayForEach,
|
| + "find", TypedArrayFind,
|
| + "findIndex", TypedArrayFindIndex,
|
| + "fill", TypedArrayFill
|
| ]);
|
| endmacro
|
|
|
|
|