summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/bug679666.js
blob: 986195ebc3a9d1d9bf102c62ebc4db43be64e3a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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);