Debian Codegraph @

js/src/jit-test/tests/gc/pretenure-array-short-lived.js

raw
1 // Allocate many short-lived objects and check that we don't pretenure them.
2
3 load(libdir + "pretenure.js");
4
5 setupPretenureTest();
6
7 allocateArrays(nurseryCount, false); // Warm up.
8
9 let { minor, major } = runTestAndCountCollections(
10 () => allocateArrays(nurseryCount * 5, false)
11 );
12
13 // Check that after the warm up period we only do minor GCs.
14 print(`${minor} minor GCs, ${major} major GCs`);
15 assertEq(minor >= 5, true);
16 assertEq(major == 0, true);