summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/bug679666.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/jaeger/bug679666.js')
-rw-r--r--js/src/jit-test/tests/jaeger/bug679666.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/jaeger/bug679666.js b/js/src/jit-test/tests/jaeger/bug679666.js
new file mode 100644
index 000000000..986195ebc
--- /dev/null
+++ b/js/src/jit-test/tests/jaeger/bug679666.js
@@ -0,0 +1,22 @@
+var arr = new Int32Array(20);
+
+function f(a1, a2) {
+ for (var i=0; i<10; i++) {
+ g1 = a2;
+ arr[a1] = a2;
+ assertEq(g1, a2);
+
+ if ([1].length === 10) {
+ a1 = {};
+ }
+ }
+}
+
+f(1, eval("{}"));
+
+for (var i=0; i<5; i++) {
+ f(2, 3);
+ f(5, -6.1);
+}
+assertEq(arr[2], 3);
+assertEq(arr[5], -6);