summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/write-frozen-dense-strict-inlinecache.js
blob: abb620c6eb9f63c19c5945f0bf1c3667f995e674 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// |jit-test| --no-threads; --ion-eager;
setJitCompilerOption('ion.forceinlineCaches', 1);
function foo(t) {
    "use strict";
    var stop;
    do {
        let ok = false;
        stop = inIon();
        try {
            t[0] = 2;
        } catch(e) {
            ok = true;
        }
        assertEq(ok, true);
    } while (!stop);
}
var t = [4];
Object.freeze(t);
foo(t);
foo(t);