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

Unified Diff: test/mjsunit/regress/regress-add-minus-zero.js

Issue 52173003: Do not remove HAdd with zero if the other operand is a double. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-add-minus-zero.js
diff --git a/test/mjsunit/regress/regress-crbug-242870.js b/test/mjsunit/regress/regress-add-minus-zero.js
similarity index 90%
copy from test/mjsunit/regress/regress-crbug-242870.js
copy to test/mjsunit/regress/regress-add-minus-zero.js
index 7183375ca811cedc81c870d34e694e98cf727f9b..0b4af754245f17b063b33f6afa517bffe1bed699 100644
--- a/test/mjsunit/regress/regress-crbug-242870.js
+++ b/test/mjsunit/regress/regress-add-minus-zero.js
@@ -27,17 +27,12 @@
// Flags: --allow-natives-syntax
-var non_const_true = true;
+var o = { a: 0 };
-function f() {
- return (non_const_true || true && g());
-}
+function f(x) { return -o.a + 0; };
-function g() {
- for (;;) {}
-}
-
-assertTrue(f());
-assertTrue(f());
+assertEquals("Infinity", String(1/f()));
+assertEquals("Infinity", String(1/f()));
%OptimizeFunctionOnNextCall(f);
-assertTrue(f());
+assertEquals("Infinity", String(1/f()));
+
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698