js/src/jit-test/tests/parallel/Array-buildPar-in-loop.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 // |jit-test| slow;
     3 load(libdir + "parallelarray-helpers.js")
     5 function buildComprehension() {
     6   var pa1 = Array.buildPar(256, function (idx) { return idx; });
     7   for (var i = 0; i < 20000; i++) {
     8     print(i);
     9     buildAndCompare();
    10   }
    12   function buildAndCompare() {
    13     // this will be ion-generated:
    14     var pa2 = Array.buildPar(256, function (idx) { return idx; });
    15     assertStructuralEq(pa1, pa2);
    16   }
    17 }
    19 if (getBuildConfiguration().parallelJS)
    20   buildComprehension();

mercurial