summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/warp/bug1697483.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /js/src/jit-test/tests/warp/bug1697483.js
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/jit-test/tests/warp/bug1697483.js')
-rw-r--r--js/src/jit-test/tests/warp/bug1697483.js46
1 files changed, 46 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/warp/bug1697483.js b/js/src/jit-test/tests/warp/bug1697483.js
new file mode 100644
index 0000000000..189029ab14
--- /dev/null
+++ b/js/src/jit-test/tests/warp/bug1697483.js
@@ -0,0 +1,46 @@
+function baz() { with({}) {}}
+
+function foo(a,b,c) {
+ var x1 = a + b;
+ var y1 = b + c;
+ var z1 = a + c;
+ var x2 = a * b;
+ var y2 = b * c;
+ var z2 = a * c;
+ var x3 = a - b;
+ var y3 = b - c;
+ var z3 = a - c;
+ var x4 = b - a;
+ var y4 = c - b;
+ var z4 = c - a;
+ var x1b = 1 + a + b;
+ var y1b = 1 + b + c;
+ var z1b = 1 + a + c;
+ var x2b = 1 + a * b;
+ var y2b = 1 + b * c;
+ var z2b = 1 + a * c;
+ var x3b = 1 + a - b;
+ var y3b = 1 + b - c;
+ var z3b = 1 + a - c;
+ var x4b = 1 + b - a;
+ var y4b = 1 + c - b;
+ var z4b = 1 + c - a;
+
+ var arg = arguments[a];
+
+ baz(x1, y1, z1, x1b, y1b, z1b,
+ x2, y2, z2, x2b, y2b, z2b,
+ x3, y3, z3, x3b, y3b, z3b,
+ x4, y4, z4, x4b, y4b, z4b);
+
+ return arg;
+}
+
+function bar(a,b,c) {
+ return foo(a+b,b+c,c+a);
+}
+
+with ({}) {}
+for (var i = 0; i < 100; i++) {
+ bar(0,0,0)
+}