summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testBug621202.js
blob: 5bf82691038eb84f22f8d505244e26ccc48d2d88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const MAX = 10000;

var arr = [];
var str = "";
for (var i = 0; i < MAX; ++i) {
    /x/.test(str);
    str = str + 'xxxxxxxxxxxxxx';
    arr.push(str);
}

arr.length = Math.floor(MAX/3);
gc();

for (var i = 0; i < MAX; ++i) {
    /x/.test(arr[i]);
}