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

Unified Diff: test/mjsunit/smi-negative-zero.js

Issue 3858001: Merge x64 minus-zero fix (bleeding_edge r5631) to 2.2 branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/2.2/
Patch Set: Created 10 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/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/smi-negative-zero.js
===================================================================
--- test/mjsunit/smi-negative-zero.js (revision 5633)
+++ test/mjsunit/smi-negative-zero.js (working copy)
@@ -98,3 +98,16 @@
assertEquals(-Infinity, one / (-4 % -2), "fiskhest2");
assertEquals(Infinity, one / (4 % 2), "fiskhest3");
assertEquals(Infinity, one / (4 % -2), "fiskhest4");
+
+
+// This tests against a singleton -0.0 object being overwritten.gc
+x = 0;
+z = 3044;
+
+function foo(x) {
+ var y = -x + z;
+ return -x;
+}
+
+assertEquals(0, foo(x));
+assertEquals(0, foo(x));
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698