summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/base-reg-fp.js
blob: f6a8bb09f18b073814022b4aca2f9a0d7939b3e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
setJitCompilerOption("base-reg-for-locals", 1); // FP
function g(x) {
    with (this) {} // Don't inline.
    return x;
}
function f(x) {
    var sum = 0;
    for (var i = 0; i < x; i++) {
        sum += g(i);
    }
    return sum;
}
assertEq(f(2000), 1999000);