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

Unified Diff: test/mjsunit/math-floor.js

Issue 7566040: Revert "tighten invariants of HValue::InferRange" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 4 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/hydrogen-instructions.cc ('k') | test/mjsunit/math-round.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/math-floor.js
diff --git a/test/mjsunit/math-floor.js b/test/mjsunit/math-floor.js
index c2992031f6002d4b1de0b527afaab2052a2fec95..11f4cd789c7587e89c576ca9e38e9c81455a115a 100644
--- a/test/mjsunit/math-floor.js
+++ b/test/mjsunit/math-floor.js
@@ -51,17 +51,6 @@ function test() {
testFloor(-Infinity, -Infinity);
testFloor(NaN, NaN);
- // Ensure that a negative zero coming from Math.floor is properly handled
- // by other operations.
- function ifloor(x) {
- return 1 / Math.floor(x);
- }
- assertEquals(-Infinity, ifloor(-0));
- assertEquals(-Infinity, ifloor(-0));
- assertEquals(-Infinity, ifloor(-0));
- %OptimizeFunctionOnNextCall(ifloor);
- assertEquals(-Infinity, ifloor(-0));
-
testFloor(0, 0.1);
testFloor(0, 0.49999999999999994);
testFloor(0, 0.5);
@@ -140,19 +129,3 @@ function test() {
for (var i = 0; i < 500; i++) {
test();
}
-
-
-// Regression test for a bug where a negative zero coming from Math.floor
-// was not properly handled by other operations.
-function floorsum(i, n) {
- var ret = Math.floor(n);
- while (--i > 0) {
- ret += Math.floor(n);
- }
- return ret;
-}
-assertEquals(-0, floorsum(1, -0));
-%OptimizeFunctionOnNextCall(floorsum);
-// The optimized function will deopt. Run it with enough iterations to try
-// to optimize via OSR (triggering the bug).
-assertEquals(-0, floorsum(100000, -0));
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | test/mjsunit/math-round.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698