summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/densify-elements.js
blob: f2944c0e55c6856365be3e56cd79ad4eed76a8f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function f(o) {
    for (var i = 1; i <= 5; i += 4) {
        var start = i * 4000;
        var end = (start * 1.4)|0;
        for (var j = end; j > start; j--) {
            o[j] = j;
        }
    }
    assertEq(Object.keys(o).length, 9600);
}
f({});
f([]);
let obj = newObjectWithManyReservedSlots();
f(obj);
checkObjectWithManyReservedSlots(obj);