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

Unified Diff: src/json.js

Issue 1345333002: src: Use simple/fast macro version of MinMax in JS (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Back from beginInt to startInt 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
« src/arraybuffer.js ('K') | « src/harmony-typedarray.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json.js
diff --git a/src/json.js b/src/json.js
index a0a88a04c1abf86b8fcea1ec23958c9da43f79d2..425b2692f3f08ea4bdd00ece26d34331841209d0 100644
--- a/src/json.js
+++ b/src/json.js
@@ -13,16 +13,12 @@
var GlobalJSON = global.JSON;
var InternalArray = utils.InternalArray;
-var MathMax;
-var MathMin;
var ObjectHasOwnProperty;
var ToNumber;
var ToString;
var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
utils.Import(function(from) {
- MathMax = from.MathMax;
- MathMin = from.MathMin;
ObjectHasOwnProperty = from.ObjectHasOwnProperty;
ToNumber = from.ToNumber;
ToString = from.ToString;
@@ -219,7 +215,7 @@ function JSONStringify(value, replacer, space) {
}
var gap;
if (IS_NUMBER(space)) {
- space = MathMax(0, MathMin($toInteger(space), 10));
+ space = MAX_SIMPLE(0, MIN_SIMPLE($toInteger(space), 10));
gap = %_SubString(" ", 0, space);
} else if (IS_STRING(space)) {
if (space.length > 10) {
« src/arraybuffer.js ('K') | « src/harmony-typedarray.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698