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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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