summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bailout-with-object-or-null.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/ion/bailout-with-object-or-null.js')
-rw-r--r--js/src/jit-test/tests/ion/bailout-with-object-or-null.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/bailout-with-object-or-null.js b/js/src/jit-test/tests/ion/bailout-with-object-or-null.js
new file mode 100644
index 000000000..260a20933
--- /dev/null
+++ b/js/src/jit-test/tests/ion/bailout-with-object-or-null.js
@@ -0,0 +1,17 @@
+
+function foo(p) {
+ this.f = p;
+}
+function use(v, a, b) {
+ var f = v.f;
+ g = f;
+ g = a + b;
+ if (f != null)
+ return;
+}
+
+with({}){}
+
+for (var i = 0; i < 2000; i++)
+ use(new foo(i % 2 ? {} : null), 1, 2);
+use(new foo(null), 2147483548, 1000);