Revision: 18188
Author:   [email protected]
Date:     Mon Dec  2 12:56:54 2013 UTC
Log:      Make sin-cos test case compatible with --always-osr.

[email protected]

Review URL: https://codereview.chromium.org/98893002
http://code.google.com/p/v8/source/detail?r=18188

Modified:
 /branches/bleeding_edge/test/mjsunit/sin-cos.js

=======================================
--- /branches/bleeding_edge/test/mjsunit/sin-cos.js Wed Nov 20 15:04:37 2013 UTC +++ /branches/bleeding_edge/test/mjsunit/sin-cos.js Mon Dec 2 12:56:54 2013 UTC
@@ -29,6 +29,22 @@

 // Flags: --allow-natives-syntax

+assertEquals("-Infinity", String(1/Math.sin(-0)));
+assertEquals(1, Math.cos(-0));
+assertEquals("-Infinity", String(1/Math.tan(-0)));
+
+// Assert that minus zero does not cause deopt.
+function no_deopt_on_minus_zero(x) {
+  return Math.sin(x) + Math.cos(x) + Math.tan(x);
+}
+
+no_deopt_on_minus_zero(1);
+no_deopt_on_minus_zero(1);
+%OptimizeFunctionOnNextCall(no_deopt_on_minus_zero);
+no_deopt_on_minus_zero(-0);
+assertOptimized(no_deopt_on_minus_zero);
+
+
 function sinTest() {
   assertEquals(0, Math.sin(0));
   assertEquals(1, Math.sin(Math.PI / 2));
@@ -169,14 +185,3 @@
 assertFalse(isNaN(Math.cos(1.57079632679489700)));
 assertFalse(isNaN(Math.cos(-1e-100)));
 assertFalse(isNaN(Math.cos(-1e-323)));
-
-
-function no_deopt_on_minus_zero(x) {
-  return Math.sin(x) + Math.cos(x) + Math.tan(x);
-}
-
-no_deopt_on_minus_zero(1);
-no_deopt_on_minus_zero(1);
-%OptimizeFunctionOnNextCall(no_deopt_on_minus_zero);
-no_deopt_on_minus_zero(-0);
-assertOptimized(no_deopt_on_minus_zero);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to