js/src/jit-test/tests/ion/getprop-idempotent-cache-1.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/jit-test/tests/ion/getprop-idempotent-cache-1.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,17 @@
     1.4 +function f(o) {
     1.5 +    var res = 0;
     1.6 +    for (var i=0; i<11000; i++) {
     1.7 +        res += o.x;
     1.8 +    }
     1.9 +    return res;
    1.10 +}
    1.11 +
    1.12 +function O(x) {
    1.13 +    if (x)
    1.14 +        this.x = 10;
    1.15 +}
    1.16 +
    1.17 +f(new O(true));
    1.18 +
    1.19 +// "o.x" is now missing so the idempotent cache should invalidate f.
    1.20 +f(new O(false));

mercurial