1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/parallel/alloc-many-objs.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,24 @@ 1.4 +load(libdir + "parallelarray-helpers.js"); 1.5 + 1.6 +function testMap() { 1.7 + // At least on my machine, this test is successful, whereas 1.8 + // `alloc-too-many-objs.js` fails to run in parallel because of 1.9 + // issues around GC. 1.10 + 1.11 + var nums = range(0, 10); 1.12 + 1.13 + assertParallelModesCommute(["seq", "par"], function(m) { 1.14 + print(m.mode+" "+m.expect); 1.15 + nums.mapPar(function (v) { 1.16 + var x = []; 1.17 + for (var i = 0; i < 45000; i++) { 1.18 + x[i] = {from: v}; 1.19 + } 1.20 + return x; 1.21 + }, m) 1.22 + }); 1.23 +} 1.24 + 1.25 +if (getBuildConfiguration().parallelJS) 1.26 + testMap(); 1.27 +