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

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

Issue 10937013: Fixed minus zero test (fixes v8:2133). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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/ia32/code-stubs-ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/deopt-minus-zero.js
diff --git a/test/mjsunit/regress/regress-cntl-descriptors-enum.js b/test/mjsunit/deopt-minus-zero.js
similarity index 76%
copy from test/mjsunit/regress/regress-cntl-descriptors-enum.js
copy to test/mjsunit/deopt-minus-zero.js
index ee72fafc8a7c67f2b1ab6cc22a734ef8033a5697..a0c1fb2c49b1a6cdf18057c22df4eda28b521a33 100644
--- a/test/mjsunit/regress/regress-cntl-descriptors-enum.js
+++ b/test/mjsunit/deopt-minus-zero.js
@@ -27,20 +27,32 @@
// Flags: --allow-natives-syntax --expose-gc
-DontEnum = 2;
-
-var o = {};
-%SetProperty(o, "a", 0, DontEnum);
-
-var o2 = {};
-%SetProperty(o2, "a", 0, DontEnum);
-
-assertTrue(%HaveSameMap(o, o2));
-
-o.y = 2;
-
-for (var v in o) { print(v); }
-o = {};
+/**
+ * The possible optimization states of a function. Must be in sync with the
+ * return values of Runtime_GetOptimizationStatus() in runtime.cc!
+ */
+var OptimizationState = {
+ YES: 1,
+ NO: 2,
+ ALWAYS: 3,
+ NEVER: 4
+};
+
+function mul (a, b) {
+ return a * b;
Jakob Kummerow 2012/09/18 13:56:09 spaces instead of the tab, please.
+}
+
+
+
+mul(-1, -1);
+mul(0x80000001|0, -1);
+mul(0x80000001|0, -1);
+%OptimizeFunctionOnNextCall(mul);
+mul(0, -1);
+%OptimizeFunctionOnNextCall(mul);
+mul(0, -1);
+
+var raw_optimized = %GetOptimizationStatus(mul);
+assertFalse(raw_optimized == OptimizationState.NO);
Jakob Kummerow 2012/09/18 13:56:09 This is the clean way to do it; in many other test
gc();
-for (var v in o2) { print(v); }
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698