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

Unified Diff: src/v8natives.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/typedarray.js ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8natives.js
diff --git a/src/v8natives.js b/src/v8natives.js
index 72d6a8464f5c48d28f328486fdac22e65d79daea..380c871e040ef47d263fbde0193d2545903359c6 100644
--- a/src/v8natives.js
+++ b/src/v8natives.js
@@ -9,9 +9,6 @@
// var $Number = global.Number;
// var $Function = global.Function;
// var $Array = global.Array;
-//
-// in math.js:
-// var $floor = MathFloor
var $isNaN = GlobalIsNaN;
var $isFinite = GlobalIsFinite;
@@ -1655,8 +1652,7 @@ function NumberIsNaN(number) {
function NumberIsSafeInteger(number) {
if (NumberIsFinite(number)) {
var integral = TO_INTEGER(number);
- if (integral == number)
- return MathAbs(integral) <= $Number.MAX_SAFE_INTEGER;
+ if (integral == number) return $abs(integral) <= $Number.MAX_SAFE_INTEGER;
}
return false;
}
« no previous file with comments | « src/typedarray.js ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698