summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/arguments-type-reflow.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/ion/arguments-type-reflow.js')
-rw-r--r--js/src/jit-test/tests/ion/arguments-type-reflow.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/arguments-type-reflow.js b/js/src/jit-test/tests/ion/arguments-type-reflow.js
new file mode 100644
index 0000000000..aaa03cc60f
--- /dev/null
+++ b/js/src/jit-test/tests/ion/arguments-type-reflow.js
@@ -0,0 +1,17 @@
+// |jit-test| error: InternalError: too much recursion
+// FIXME: this should not give an internal error once OSI lands.
+
+var forceReflow = false;
+
+function rec(x, self) {
+ if (x > 0)
+ self(x - 1, self);
+ else if (forceReflow)
+ self(NaN, self);
+}
+
+for (var i = 0; i < 40; ++i)
+ rec(1, rec);
+
+forceReflow = true;
+rec(1, rec);