Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Unified Diff: src/js/typedarray.js

Issue 2735563002: Migrate %TypedArray%.prototype.fill to C++ (Closed)
Patch Set: Merge branch 'master' into fill Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/js/typedarray.js
diff --git a/src/js/typedarray.js b/src/js/typedarray.js
index e4556b706a53fdff42a61693bebbfef90ed8dad2..06d1657d40c5e198e48ee6df76ae8c8def4d850a 100644
--- a/src/js/typedarray.js
+++ b/src/js/typedarray.js
@@ -21,7 +21,6 @@ var GlobalArrayBuffer = global.ArrayBuffer;
var GlobalArrayBufferPrototype = GlobalArrayBuffer.prototype;
var GlobalObject = global.Object;
var InnerArrayEvery;
-var InnerArrayFill;
var InnerArrayFilter;
var InnerArrayFind;
var InnerArrayFindIndex;
@@ -68,7 +67,6 @@ utils.Import(function(from) {
GetIterator = from.GetIterator;
GetMethod = from.GetMethod;
InnerArrayEvery = from.InnerArrayEvery;
- InnerArrayFill = from.InnerArrayFill;
InnerArrayFilter = from.InnerArrayFilter;
InnerArrayFind = from.InnerArrayFind;
InnerArrayFindIndex = from.InnerArrayFindIndex;
@@ -396,17 +394,6 @@ function TypedArrayForEach(f, receiver) {
%FunctionSetLength(TypedArrayForEach, 1);
-// ES6 draft 04-05-14 section 22.2.3.8
-function TypedArrayFill(value, start, end) {
- if (!IS_TYPEDARRAY(this)) throw %make_type_error(kNotTypedArray);
-
- var length = %_TypedArrayGetLength(this);
-
- return InnerArrayFill(value, start, end, this, length);
-}
-%FunctionSetLength(TypedArrayFill, 1);
-
-
// ES6 draft 07-15-13, section 22.2.3.9
function TypedArrayFilter(f, thisArg) {
if (!IS_TYPEDARRAY(this)) throw %make_type_error(kNotTypedArray);
@@ -658,7 +645,6 @@ utils.InstallFunctions(GlobalTypedArray.prototype, DONT_ENUM, [
"subarray", TypedArraySubArray,
"set", TypedArraySet,
"every", TypedArrayEvery,
- "fill", TypedArrayFill,
"filter", TypedArrayFilter,
"find", TypedArrayFind,
"findIndex", TypedArrayFindIndex,
« src/elements.cc ('K') | « src/js/array.js ('k') | test/mjsunit/es6/typedarray-fill.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698