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

Unified Diff: src/typedarray.js

Issue 990883002: Hide Math function implementations in a closure. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove printf and unnecessary test case change. Created 5 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
« no previous file with comments | « src/third_party/fdlibm/fdlibm.js ('k') | src/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typedarray.js
diff --git a/src/typedarray.js b/src/typedarray.js
index 4420bce4bc8dd8a2acc5740095e5f8e9d7ef323b..caa428cc91cb8b454015eea32180721521a4306e 100644
--- a/src/typedarray.js
+++ b/src/typedarray.js
@@ -162,16 +162,16 @@ function NAMESubArray(begin, end) {
var srcLength = %_TypedArrayGetLength(this);
if (beginInt < 0) {
- beginInt = MathMax(0, srcLength + beginInt);
+ beginInt = $max(0, srcLength + beginInt);
} else {
- beginInt = MathMin(srcLength, beginInt);
+ beginInt = $min(srcLength, beginInt);
}
var endInt = IS_UNDEFINED(end) ? srcLength : end;
if (endInt < 0) {
- endInt = MathMax(0, srcLength + endInt);
+ endInt = $max(0, srcLength + endInt);
} else {
- endInt = MathMin(endInt, srcLength);
+ endInt = $min(endInt, srcLength);
}
if (endInt < beginInt) {
endInt = beginInt;
« no previous file with comments | « src/third_party/fdlibm/fdlibm.js ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698