js/src/jit-test/tests/jaeger/bug655505.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/jaeger/bug655505.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,15 @@
     1.4 +var a = [, , , , , , ];
     1.5 +var res = 0;
     1.6 +exhaustiveSliceTest("exhaustive slice test 1", a);
     1.7 +function mySlice(a, from, to) {
     1.8 +    var to2 = to;
     1.9 +    if (to2 > 0) {
    1.10 +        res += to2;
    1.11 +        to2 = to2.length + to;
    1.12 +    }
    1.13 +}
    1.14 +function exhaustiveSliceTest(testname, a) { x = a; }
    1.15 +for (y = a.length; y >= 0; y--) {
    1.16 +    mySlice(a, x, y);
    1.17 +}
    1.18 +assertEq(res, 21);

mercurial