summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/getprop-idempotent-cache-1.js
blob: bddde433f68383e06dd07e55d8362a8713d0a2c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function f(o) {
    var res = 0;
    for (var i=0; i<11000; i++) {
        res += o.x;
    }
    return res;
}

function O(x) {
    if (x)
        this.x = 10;
}

f(new O(true));

// "o.x" is now missing so the idempotent cache should invalidate f.
f(new O(false));