summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/InlineAddVTypeMonitor.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/ion/InlineAddVTypeMonitor.js')
-rw-r--r--js/src/jit-test/tests/ion/InlineAddVTypeMonitor.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/InlineAddVTypeMonitor.js b/js/src/jit-test/tests/ion/InlineAddVTypeMonitor.js
new file mode 100644
index 0000000000..af5b9532cf
--- /dev/null
+++ b/js/src/jit-test/tests/ion/InlineAddVTypeMonitor.js
@@ -0,0 +1,17 @@
+// make sure AddV instruction is monitoring the output type when 'f' is inlined
+// into the loop of 'g'
+var x = {};
+var y = [];
+
+function f(i) {
+ return x + y;
+}
+
+function g(m) {
+ var i;
+ for (i = 0; i < m; i++) {
+ f(i);
+ }
+}
+
+g(101);