summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testThinLoopDemote.js
blob: b26c460a78444e408aaff6ac770db1a3676b78a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function testThinLoopDemote() {
    function f()
    {
        var k = 1;
        for (var n = 0; n < 4; n++) {
            k = (k * 10);
        }
        return k;
    }
    f();
    return f();
}
assertEq(testThinLoopDemote(), 10000);