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

Unified Diff: test/mjsunit/sin-cos.js

Issue 136643008: A64: Synchronize with r18256. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | « test/mjsunit/regress/regress-crbug-325225.js ('k') | tools/merge-to-branch.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/sin-cos.js
diff --git a/test/mjsunit/sin-cos.js b/test/mjsunit/sin-cos.js
index b63c15e13c2e29151e1311032d85a3cff64c4dd6..02ae57ba2773529d20e683eb63fc7b10d135bd26 100644
--- a/test/mjsunit/sin-cos.js
+++ b/test/mjsunit/sin-cos.js
@@ -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 @@ for (var i = -1024; i < 1024; i++) {
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);
« no previous file with comments | « test/mjsunit/regress/regress-crbug-325225.js ('k') | tools/merge-to-branch.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698