]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - tests/stress/ftl-arithsin.js
JavaScriptCore-7600.1.4.9.tar.gz
[apple/javascriptcore.git] / tests / stress / ftl-arithsin.js
diff --git a/tests/stress/ftl-arithsin.js b/tests/stress/ftl-arithsin.js
new file mode 100644 (file)
index 0000000..b559f4d
--- /dev/null
@@ -0,0 +1,13 @@
+function foo(x) {
+    return Math.sin(x);
+}
+
+noInline(foo);
+
+var j = 0;
+for (var i = 0; i < 100000; ++i)
+    j = foo(i);
+
+if (0.860248280789742 != j){
+    throw "Error"
+}