summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug1543166.js
blob: ea67400c2bab05e0221689f106177329aa9380c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function f() {
    var arr = [];
    for (var i = 0; i < 12; i++) {
        // Create a new global to get "DOM" objects with different groups.
        var g = newGlobal();
        var o = new g.FakeDOMObject();
        o[0] = 1;
        arr.push(o);
    }
    var res;
    for (var i = 0; i < 2000; i++) {
        var o = arr[i % arr.length];
        res = o[0];
    }
    return res;
}
f();