js/src/jit-test/tests/parallel/bug909743.js

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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 }

mercurial