Index: src/js/math.js |
diff --git a/src/js/math.js b/src/js/math.js |
index c17441db8064ec48c7f308a6e665060eb31acc90..99f5e009664e3da78884321de876ec2fea50bcc9 100644 |
--- a/src/js/math.js |
+++ b/src/js/math.js |
@@ -41,7 +41,7 @@ function MathAtan2JS(y, x) { |
// ECMA 262 - 15.8.2.6 |
function MathCeil(x) { |
- return -%_MathFloor(-x); |
+ return -%math_floor(-x); |
} |
// ECMA 262 - 15.8.2.8 |
@@ -49,11 +49,6 @@ function MathExp(x) { |
return %MathExpRT(TO_NUMBER(x)); |
} |
-// ECMA 262 - 15.8.2.9 |
-function MathFloorJS(x) { |
- return %_MathFloor(+x); |
-} |
- |
// ECMA 262 - 15.8.2.10 |
function MathLog(x) { |
return %_MathLogRT(TO_NUMBER(x)); |
@@ -103,8 +98,8 @@ function MathSign(x) { |
// ES6 draft 09-27-13, section 20.2.2.34. |
function MathTrunc(x) { |
x = +x; |
- if (x > 0) return %_MathFloor(x); |
- if (x < 0) return -%_MathFloor(-x); |
+ if (x > 0) return %math_floor(x); |
+ if (x < 0) return -%math_floor(-x); |
// -0, 0 or NaN. |
return x; |
} |
@@ -187,7 +182,7 @@ macro NEWTON_ITERATION_CBRT(x, approx) |
endmacro |
function CubeRoot(x) { |
- var approx_hi = MathFloorJS(%_DoubleHi(x) / 3) + 0x2A9F7893; |
+ var approx_hi = %math_floor(%_DoubleHi(x) / 3) + 0x2A9F7893; |
var approx = %_ConstructDouble(approx_hi | 0, 0); |
approx = NEWTON_ITERATION_CBRT(x, approx); |
approx = NEWTON_ITERATION_CBRT(x, approx); |
@@ -226,7 +221,6 @@ utils.InstallFunctions(GlobalMath, DONT_ENUM, [ |
"abs", MathAbs, |
"ceil", MathCeil, |
"exp", MathExp, |
- "floor", MathFloorJS, |
"log", MathLog, |
"round", MathRound, |
"atan2", MathAtan2JS, |
@@ -245,7 +239,6 @@ utils.InstallFunctions(GlobalMath, DONT_ENUM, [ |
%SetForceInlineFlag(MathAtan2JS); |
%SetForceInlineFlag(MathCeil); |
%SetForceInlineFlag(MathClz32JS); |
-%SetForceInlineFlag(MathFloorJS); |
%SetForceInlineFlag(MathRandom); |
%SetForceInlineFlag(MathSign); |
%SetForceInlineFlag(MathTrunc); |
@@ -256,7 +249,6 @@ utils.InstallFunctions(GlobalMath, DONT_ENUM, [ |
utils.Export(function(to) { |
to.MathAbs = MathAbs; |
to.MathExp = MathExp; |
- to.MathFloor = MathFloorJS; |
to.IntRandom = MathRandomRaw; |
}); |