Fri, 16 Jan 2015 04:50:19 +0100
Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32
1 if (getBuildConfiguration().parallelJS) {
2 function assertParallelExecSucceeds(opFunction) {
3 for (var i = 0; i < 100; ++i) {
4 opFunction({mode:"compile"});
5 }
6 }
7 function assertArraySeqParResultsEq(arr, op, func) {
8 assertParallelExecSucceeds(
9 function (m) {
10 return arr[op + "Par"].apply(arr, [func, m]);
11 }
12 );
13 }
14 function range(n, m) {
15 var result = [];
16 for (var i = n; i < m; i++)
17 result.push(i);
18 return result;
19 }
20 assertArraySeqParResultsEq(range(0, 512), "map", function(e) { return e+'x'; });
21 }