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

Unified Diff: src/harmony-typedarray.js

Issue 1326263002: Avoid using %_CallFunction if the receiver doesn't change. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/array.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/harmony-typedarray.js
diff --git a/src/harmony-typedarray.js b/src/harmony-typedarray.js
index cd220dae832e2e1dfdc9480b979951e53f2c27b6..94d5f9a981396ff4344358250c0e2a3a14690a03 100644
--- a/src/harmony-typedarray.js
+++ b/src/harmony-typedarray.js
@@ -215,7 +215,7 @@ function TypedArraySort(comparefn) {
comparefn = TypedArrayComparefn;
}
- return %_CallFunction(this, length, comparefn, InnerArraySort);
+ return InnerArraySort(this, length, comparefn);
}
@@ -224,8 +224,7 @@ function TypedArrayIndexOf(element, index) {
if (!%_IsTypedArray(this)) throw MakeTypeError(kNotTypedArray);
var length = %_TypedArrayGetLength(this);
-
- return %_CallFunction(this, element, index, length, InnerArrayIndexOf);
+ return InnerArrayIndexOf(this, element, index, length);
}
%FunctionSetLength(TypedArrayIndexOf, 1);
@@ -236,8 +235,8 @@ function TypedArrayLastIndexOf(element, index) {
var length = %_TypedArrayGetLength(this);
- return %_CallFunction(this, element, index, length,
- %_ArgumentsLength(), InnerArrayLastIndexOf);
+ return InnerArrayLastIndexOf(this, element, index, length,
+ %_ArgumentsLength());
}
%FunctionSetLength(TypedArrayLastIndexOf, 1);
« no previous file with comments | « src/array.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698