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

Unified Diff: test/mjsunit/compiler/minus-zero.js

Issue 61893018: Tweak minus zero detect of HChange (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: rebase Created 7 years, 1 month 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/compiler/minus-zero.js
diff --git a/test/mjsunit/compiler/minus-zero.js b/test/mjsunit/compiler/minus-zero.js
index c161257d77a838b1d81b3454ae5d30b0a33b6425..e563a78433c89436633a84633fd0939f1dc81b0c 100644
--- a/test/mjsunit/compiler/minus-zero.js
+++ b/test/mjsunit/compiler/minus-zero.js
@@ -91,3 +91,15 @@ assertEquals(1, 1/add(double_one, 0));
assertEquals(1, 1/add(0, double_one));
%OptimizeFunctionOnNextCall(add);
assertEquals(1/(-0 + -0), 1/add(-0, -0));
+
+
+function foo(x, y, z) {
+ var w = x * y;
+ return w + z;
+}
+
+assertEquals(1, foo(0, 1, 1));
+assertEquals(1, foo(0, 1, 1));
+%OptimizeFunctionOnNextCall(foo);
+assertEquals(1, foo(0, -1, 1));
+assertOptimized(foo);
« 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