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

Unified Diff: src/harmony-string.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/date.js ('k') | src/json.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/harmony-string.js
diff --git a/src/harmony-string.js b/src/harmony-string.js
index 6bbe139e87a3a2e96227799fea537261e9f87b51..b3192937effd6a410f8ddee6946575e0d4676bc9 100644
--- a/src/harmony-string.js
+++ b/src/harmony-string.js
@@ -52,7 +52,7 @@ function StringStartsWith(searchString /* position */) { // length == 1
}
var s_len = s.length;
- var start = MathMin(MathMax(pos, 0), s_len);
+ var start = $min($max(pos, 0), s_len);
var ss_len = ss.length;
if (ss_len + start > s_len) {
return false;
@@ -83,7 +83,7 @@ function StringEndsWith(searchString /* position */) { // length == 1
}
}
- var end = MathMin(MathMax(pos, 0), s_len);
+ var end = $min($max(pos, 0), s_len);
var ss_len = ss.length;
var start = end - ss_len;
if (start < 0) {
@@ -113,7 +113,7 @@ function StringIncludes(searchString /* position */) { // length == 1
}
var s_len = s.length;
- var start = MathMin(MathMax(pos, 0), s_len);
+ var start = $min($max(pos, 0), s_len);
var ss_len = ss.length;
if (ss_len + start > s_len) {
return false;
« no previous file with comments | « src/date.js ('k') | src/json.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698