summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/new-3.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/ion/new-3.js')
-rw-r--r--js/src/jit-test/tests/ion/new-3.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/new-3.js b/js/src/jit-test/tests/ion/new-3.js
new file mode 100644
index 0000000000..b7b2fa89fa
--- /dev/null
+++ b/js/src/jit-test/tests/ion/new-3.js
@@ -0,0 +1,18 @@
+// Uncompiled, polymorphic callsite for |new|.
+
+function Foo(prop) {
+ this.name = "Foo";
+ this.prop = prop;
+}
+
+function f() {
+ // Enter OSR here.
+ for (var i = 0; i < 100; i++)
+ { }
+
+ // No type information below this point.
+ var x = new Foo("cats");
+ return x;
+}
+
+assertEq(f().prop, "cats");