summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/getelem-hole.js
blob: de3517ecbb7122019760cbc85150f3ad5e980219 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var a = [1, 2, 3];
var b = [4, 5, 6];

function testFold() {
    for (var i=0; i<10; i++) {
        var x = a[i];
        var y = a[i];
        var z = b[i];
        assertEq(x, y);
        if (i < 3)
            assertEq(x !== z, true);
    }
}
for (var i=0; i<10; i++)
    testFold();