summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/function/bug-1751660.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/function/bug-1751660.js')
-rw-r--r--js/src/jit-test/tests/function/bug-1751660.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/function/bug-1751660.js b/js/src/jit-test/tests/function/bug-1751660.js
new file mode 100644
index 0000000000..98317e7878
--- /dev/null
+++ b/js/src/jit-test/tests/function/bug-1751660.js
@@ -0,0 +1,26 @@
+function foo() {}
+
+function bar(o) {
+ function nested() {
+ with (o) {
+ return Object(...arguments);
+ }
+ }
+
+ // We need an arbitrary IC before the OSR loop.
+ foo();
+
+ // Trigger on-stack-replacement.
+ for(let i = 0; i < 100; i++) {}
+
+ // Make the call.
+ return nested();
+}
+
+// Trigger OSR compilation.
+for (var i = 0; i < 5; i++) {
+ bar({});
+}
+
+// Call passing in the function itself.
+print(bar(bar));