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

Unified Diff: src/js/typedarray.js

Issue 1678953004: [builtins] Remove bunch of uses of %_Arguments and %_ArgumentsLength. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Fix deoptimizer adapted arguments materialization for builtins. Created 4 years, 10 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
« no previous file with comments | « src/js/spread.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/typedarray.js
diff --git a/src/js/typedarray.js b/src/js/typedarray.js
index 99fd0276e37812fececd596e957ffd395db32212..2b63973b9f5aa01c4e93019e6f2f4f2db48d4d2e 100644
--- a/src/js/typedarray.js
+++ b/src/js/typedarray.js
@@ -615,7 +615,7 @@ function TypedArrayLastIndexOf(element, index) {
var length = %_TypedArrayGetLength(this);
return InnerArrayLastIndexOf(this, element, index, length,
- %_ArgumentsLength());
+ arguments.length);
}
%FunctionSetLength(TypedArrayLastIndexOf, 1);
@@ -679,7 +679,7 @@ function TypedArrayReduce(callback, current) {
var length = %_TypedArrayGetLength(this);
return InnerArrayReduce(callback, current, this, length,
- %_ArgumentsLength());
+ arguments.length);
}
%FunctionSetLength(TypedArrayReduce, 1);
@@ -690,7 +690,7 @@ function TypedArrayReduceRight(callback, current) {
var length = %_TypedArrayGetLength(this);
return InnerArrayReduceRight(callback, current, this, length,
- %_ArgumentsLength());
+ arguments.length);
}
%FunctionSetLength(TypedArrayReduceRight, 1);
@@ -751,10 +751,10 @@ function TypedArrayIncludes(searchElement, fromIndex) {
// ES6 draft 08-24-14, section 22.2.2.2
function TypedArrayOf() {
- var length = %_ArgumentsLength();
+ var length = arguments.length;
var array = TypedArrayCreate(this, length);
for (var i = 0; i < length; i++) {
- array[i] = %_Arguments(i);
+ array[i] = arguments[i];
}
return array;
}
@@ -918,7 +918,7 @@ function DataViewGetTYPENAMEJS(offset, little_endian) {
throw MakeTypeError(kIncompatibleMethodReceiver,
'DataView.getTYPENAME', this);
}
- if (%_ArgumentsLength() < 1) throw MakeTypeError(kInvalidArgument);
+ if (arguments.length < 1) throw MakeTypeError(kInvalidArgument);
offset = ToPositiveInteger(offset, kInvalidDataViewAccessorOffset);
return %DataViewGetTYPENAME(this, offset, !!little_endian);
}
@@ -929,7 +929,7 @@ function DataViewSetTYPENAMEJS(offset, value, little_endian) {
throw MakeTypeError(kIncompatibleMethodReceiver,
'DataView.setTYPENAME', this);
}
- if (%_ArgumentsLength() < 2) throw MakeTypeError(kInvalidArgument);
+ if (arguments.length < 2) throw MakeTypeError(kInvalidArgument);
offset = ToPositiveInteger(offset, kInvalidDataViewAccessorOffset);
%DataViewSetTYPENAME(this, offset, TO_NUMBER(value), !!little_endian);
}
« no previous file with comments | « src/js/spread.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698