]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - tests/stress/int52-force-osr-exit-path.js
JavaScriptCore-7600.1.4.9.tar.gz
[apple/javascriptcore.git] / tests / stress / int52-force-osr-exit-path.js
diff --git a/tests/stress/int52-force-osr-exit-path.js b/tests/stress/int52-force-osr-exit-path.js
new file mode 100644 (file)
index 0000000..a7bf3b9
--- /dev/null
@@ -0,0 +1,15 @@
+function foo(a, b, p, o) {
+    var c = a + b;
+    if (p)
+        c -= o.f;
+    return c + 1;
+}
+
+noInline(foo);
+
+var o = {f: 42};
+for (var i = 0; i < 100000; ++i) {
+    var result = foo(2000000000, 2000000000, false, o);
+    if (result != 4000000001)
+        throw "Error: bad result: " + result;
+}