summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/bug655505.js
blob: 4d2e07c66875e4e96b0008494aadbd8d56d42217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var a = [, , , , , , ];
var res = 0;
exhaustiveSliceTest("exhaustive slice test 1", a);
function mySlice(a, from, to) {
    var to2 = to;
    if (to2 > 0) {
        res += to2;
        to2 = to2.length + to;
    }
}
function exhaustiveSliceTest(testname, a) { x = a; }
for (y = a.length; y >= 0; y--) {
    mySlice(a, x, y);
}
assertEq(res, 21);