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

Unified Diff: src/runtime.js

Issue 1353953002: Use a kMaxSafeInteger instead of Number.MAX_SAFE_INTEGER (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Zap unneccessary GlobalNumber in runtime.js 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/macros.py ('k') | src/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.js
diff --git a/src/runtime.js b/src/runtime.js
index 39939b16027f9447967becf4e3b374aafdb8fd21..a49a3bdfa991279df019c6d944cb6d3e2c08bf82 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -33,7 +33,6 @@ var harmony_tolength = false;
var GlobalArray = global.Array;
var GlobalBoolean = global.Boolean;
var GlobalString = global.String;
-var GlobalNumber = global.Number;
var isConcatSpreadableSymbol =
utils.ImportNow("is_concat_spreadable_symbol");
@@ -302,8 +301,7 @@ function ToInteger(x) {
function ToLength(arg) {
arg = ToInteger(arg);
if (arg < 0) return 0;
- return arg < GlobalNumber.MAX_SAFE_INTEGER ? arg
- : GlobalNumber.MAX_SAFE_INTEGER;
+ return arg < kMaxSafeInteger ? arg : kMaxSafeInteger;
}
« no previous file with comments | « src/macros.py ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698