bug-1374797.js (742B)
1 // |jit-test| skip-if: helperThreadCount() === 0 2 3 // Exercise triggering GC of atoms zone while off-thread parsing is happening. 4 5 gczeal(0); 6 7 // Reduce some GC parameters so that we can trigger a GC more easily. 8 gcparam('lowFrequencyHeapGrowth', 120); 9 gcparam('highFrequencyLargeHeapGrowth', 120); 10 gcparam('highFrequencySmallHeapGrowth', 120); 11 gcparam('allocationThreshold', 1); 12 gc(); 13 14 // Start an off-thread parse. 15 offThreadCompileToStencil("print('Finished')"); 16 17 // Allocate lots of atoms, parsing occasionally. 18 for (let i = 0; i < 10; i++) { 19 print(i); 20 for (let j = 0; j < 10000; j++) 21 Symbol.for(i + 10 * j); 22 eval(`${i}`); 23 } 24 25 // Finish the off-thread parse. 26 var stencil = finishOffThreadStencil(); 27 evalStencil(stencil);