Index: src/math.js |
diff --git a/src/math.js b/src/math.js |
index 789886e2d1c4abf87d0bb2ba5612e35f1f263e33..5cbe94a35c7be9d71024a39b266ec8e920e022b6 100644 |
--- a/src/math.js |
+++ b/src/math.js |
@@ -74,7 +74,7 @@ function MathAtan2(y, x) { |
// ECMA 262 - 15.8.2.6 |
function MathCeil(x) { |
- return %Math_ceil(TO_NUMBER_INLINE(x)); |
+ return -MathFloor(-x); |
} |
// ECMA 262 - 15.8.2.7 |
@@ -348,6 +348,7 @@ function SetUpMath() { |
"imul", MathImul |
)); |
+ %SetInlineBuiltinFlag(MathCeil); |
%SetInlineBuiltinFlag(MathRandom); |
%SetInlineBuiltinFlag(MathSin); |
%SetInlineBuiltinFlag(MathCos); |