Bug 861705 - Check for ParallelArray being disabled in various tests r=sstangl
authorNicholas D. Matsakis <nmatsakis@mozilla.com>
Thu, 18 Apr 2013 05:53:53 -0400
changeset 141169 658d81e9c17fb9f29ac2a4e03e8d540b27aec6f9
parent 141168 d2824a51c0276955755ed60ab7fd40d131734a3f
child 141170 33b755e0237da7ae5c65eb752b94c127991f1ee6
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstangl
bugs861705
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 861705 - Check for ParallelArray being disabled in various tests r=sstangl
js/src/jit-test/tests/auto-regress/bug755564.js
js/src/jit-test/tests/auto-regress/bug783923.js
js/src/jit-test/tests/auto-regress/bug784011.js
js/src/jit-test/tests/auto-regress/bug784015.js
js/src/jit-test/tests/auto-regress/bug786106.js
js/src/jit-test/tests/auto-regress/bug789107.js
js/src/jit-test/tests/auto-regress/bug791445.js
js/src/jit-test/tests/baseline/bug846072.js
js/src/jit-test/tests/baseline/bug857579.js
js/src/jit-test/tests/basic/bug815652.js
js/src/jit-test/tests/parallelarray/bug853555.js
js/src/jit-test/tests/parallelarray/bug853573.js
js/src/jit-test/tests/parallelarray/bug854021.js
js/src/jit-test/tests/parallelarray/bug854050.js
js/src/jit-test/tests/parallelarray/bug854381.js
js/src/jit-test/tests/parallelarray/bug857846.js
js/src/jit-test/tests/parallelarray/bug858582.js
js/src/jit-test/tests/parallelarray/inline-new-bad-type.js
--- a/js/src/jit-test/tests/auto-regress/bug755564.js
+++ b/js/src/jit-test/tests/auto-regress/bug755564.js
@@ -1,7 +1,9 @@
 // Binary: cache/js-dbg-64-50177d59c0e1-linux
 // Flags:
 //
 
-var p = new ParallelArray([1,2,3,4,5]);
-var r = p.scatter([0,1,0,3,4], 9, function (a,b) { return a+b; });
-assertEq(r.toString( 5 ? r : 0, gc()) ,[4,2,9,4,5].join(","));
+if (getBuildConfiguration().parallelJS) {
+  var p = new ParallelArray([1,2,3,4,5]);
+  var r = p.scatter([0,1,0,3,4], 9, function (a,b) { return a+b; });
+  assertEq(r.toString( 5 ? r : 0, gc()) ,[4,2,9,4,5].join(","));
+}
--- a/js/src/jit-test/tests/auto-regress/bug783923.js
+++ b/js/src/jit-test/tests/auto-regress/bug783923.js
@@ -1,4 +1,6 @@
 // Binary: cache/js-dbg-64-35b8d6ef5d46-linux
 // Flags:
 //
-print(ParallelArray());
+
+if (getBuildConfiguration().parallelJS)
+  print(ParallelArray());
--- a/js/src/jit-test/tests/auto-regress/bug784011.js
+++ b/js/src/jit-test/tests/auto-regress/bug784011.js
@@ -1,6 +1,8 @@
 // Binary: cache/js-dbg-64-c676b554c7bb-linux
 // Flags:
 //
 
-var p2 = new ParallelArray([2,2], function(i,j) { return i+j; });
-p2.get({ 0: 1, 1: 0, testGet: 2 })
+if (getBuildConfiguration().parallelJS) {
+  var p2 = new ParallelArray([2,2], function(i,j) { return i+j; });
+  p2.get({ 0: 1, 1: 0, testGet: 2 })
+}
--- a/js/src/jit-test/tests/auto-regress/bug784015.js
+++ b/js/src/jit-test/tests/auto-regress/bug784015.js
@@ -1,8 +1,12 @@
 // |jit-test| error:Error
 
 // Binary: cache/js-dbg-64-c676b554c7bb-linux
 // Flags:
 //
 
-var p = new ParallelArray([1,25e8 ,3,4]);
-var pp = p.partition(.34 );
+if (getBuildConfiguration().parallelJS) {
+  var p = new ParallelArray([1,25e8 ,3,4]);
+  var pp = p.partition(.34 );
+} else {
+  throw new Error();
+}
--- a/js/src/jit-test/tests/auto-regress/bug786106.js
+++ b/js/src/jit-test/tests/auto-regress/bug786106.js
@@ -1,6 +1,8 @@
 // Binary: cache/js-dbg-64-92b9b2840a79-linux
 // Flags:
 //
 
-    var p = new ParallelArray([2, 3,, 4, 5, 6]);
-    var r = p.scatter([0,1,0,3,4], 9, function (a,b) { return a+b; });
+if (getBuildConfiguration().parallelJS) {
+  var p = new ParallelArray([2, 3,, 4, 5, 6]);
+  var r = p.scatter([0,1,0,3,4], 9, function (a,b) { return a+b; });
+}
--- a/js/src/jit-test/tests/auto-regress/bug789107.js
+++ b/js/src/jit-test/tests/auto-regress/bug789107.js
@@ -1,4 +1,7 @@
 // Binary: cache/js-dbg-64-5d63594c05a9-linux
 // Flags:
 //
-ParallelArray().watch("shape", function() {})
+
+if (getBuildConfiguration().parallelJS) {
+  ParallelArray().watch("shape", function() {})
+}
--- a/js/src/jit-test/tests/auto-regress/bug791445.js
+++ b/js/src/jit-test/tests/auto-regress/bug791445.js
@@ -1,4 +1,7 @@
 // Binary: cache/js-dbg-64-9fff2012b66c-linux
 // Flags:
 //
-ParallelArray(0, Proxy.createFunction(function(){}, function(){}))
+
+if (getBuildConfiguration().parallelJS) {
+  ParallelArray(0, Proxy.createFunction(function(){}, function(){}))
+}
--- a/js/src/jit-test/tests/baseline/bug846072.js
+++ b/js/src/jit-test/tests/baseline/bug846072.js
@@ -1,3 +1,7 @@
 // |jit-test| error: TypeError
-toString = undefined;
-if (!(this in ParallelArray)) {}
+if (getBuildConfiguration().parallelJS) {
+  toString = undefined;
+  if (!(this in ParallelArray)) {}
+} else {
+  throw new TypeError();
+}
--- a/js/src/jit-test/tests/baseline/bug857579.js
+++ b/js/src/jit-test/tests/baseline/bug857579.js
@@ -10,9 +10,13 @@ function testMonitorIntrinsic() {
       // When |i| goes out of bounds, we will bail from Ion to BC on an
       // 'undefined' result inside parallel array's .get, tripping a type
       // barrier on GETINTRINSIC.
       p.get(i).get(j);
     }
   }
 }
 
-testMonitorIntrinsic();
+if (getBuildConfiguration().parallelJS) {
+  testMonitorIntrinsic();
+} else {
+  throw new TypeError();
+}
--- a/js/src/jit-test/tests/basic/bug815652.js
+++ b/js/src/jit-test/tests/basic/bug815652.js
@@ -2,9 +2,11 @@
 gczeal(9, 2)
 function testScatterConflict() {
   var p = new ParallelArray([1,2,3,4,5]);
   var r = p.scatter([0,1,0,3,(0)], 9, function (a,b) { return a+b; });
   function assertEqParallelArray(a, b)
     assertEq(a instanceof ParallelArray, true);
   assertEqParallelArray(r, new ParallelArray([4,2,(false),4,5]));
 }
-testScatterConflict();
+if (getBuildConfiguration().parallelJS) {
+  testScatterConflict();
+}
--- a/js/src/jit-test/tests/parallelarray/bug853555.js
+++ b/js/src/jit-test/tests/parallelarray/bug853555.js
@@ -1,6 +1,12 @@
-Object.prototype[0] = /a/;
-function getterFunction(v) { return "getter"; }
-Object.defineProperty(Array.prototype, 1, { get: getterFunction });
-gczeal(4);
-var p = new ParallelArray([1,2,3,4,5]);
-p.scatter([0,1,0,3,01], 9, function (a,b) { return a+b; });
\ No newline at end of file
+function test() {
+  Object.prototype[0] = /a/;
+  function getterFunction(v) { return "getter"; }
+  Object.defineProperty(Array.prototype, 1, { get: getterFunction });
+  gczeal(4);
+  var p = new ParallelArray([1,2,3,4,5]);
+  p.scatter([0,1,0,3,01], 9, function (a,b) { return a+b; });
+}
+
+if (getBuildConfiguration().parallelJS)
+  test();
+
--- a/js/src/jit-test/tests/parallelarray/bug853573.js
+++ b/js/src/jit-test/tests/parallelarray/bug853573.js
@@ -1,14 +1,17 @@
-var p = Proxy.create({
-  has : function(id) {}
-});
-Object.prototype.__proto__ = p;
-  var pa0 = new ParallelArray(range(0, 256));
-  var pa1 = new ParallelArray(256, function (x) {
-    return pa0.map(function(y) {});
+if (getBuildConfiguration().parallelJS) {
+  var p = Proxy.create({
+    has : function(id) {}
   });
+  Object.prototype.__proto__ = p;
+    var pa0 = new ParallelArray(range(0, 256));
+    var pa1 = new ParallelArray(256, function (x) {
+      return pa0.map(function(y) {});
+    });
+}
+
 function range(n, m) {
   var result = [];
   for (var i = n; i < m; i++)
     result.push(i);
   return result;
-}
\ No newline at end of file
+}
--- a/js/src/jit-test/tests/parallelarray/bug854021.js
+++ b/js/src/jit-test/tests/parallelarray/bug854021.js
@@ -1,2 +1,3 @@
 // Don't crash.
-ParallelArray(7, function ([y]) {})
+if (getBuildConfiguration().parallelJS)
+  ParallelArray(7, function ([y]) {})
--- a/js/src/jit-test/tests/parallelarray/bug854050.js
+++ b/js/src/jit-test/tests/parallelarray/bug854050.js
@@ -1,9 +1,10 @@
 function bug854050() {
   // Shouldn't crash. Tests Ion's argumentsRectifier loading the right
   // IonScript depending on execution mode.
   for (z = 0; z < 1; z++)
     function x(b, x) {}
   ParallelArray(47, x);
 }
 
-bug854050();
+if (getBuildConfiguration().parallelJS)
+  bug854050();
--- a/js/src/jit-test/tests/parallelarray/bug854381.js
+++ b/js/src/jit-test/tests/parallelarray/bug854381.js
@@ -10,9 +10,11 @@ function bug854381() {
 
   var p = new ParallelArray(['x', 'x']);
   var r = new ParallelArray([toString(p), 42]);
 
   gc();
   print(toString(r));
 }
 
-bug854381();
+if (getBuildConfiguration().parallelJS) {
+  bug854381();
+}
--- a/js/src/jit-test/tests/parallelarray/bug857846.js
+++ b/js/src/jit-test/tests/parallelarray/bug857846.js
@@ -1,7 +1,9 @@
 function testNegativeZeroScatter() {
   // Don't crash.
   var p = new ParallelArray([0]);
   var r = p.scatter([-0], 0, undefined, 1);
 }
 
-testNegativeZeroScatter();
+if (getBuildConfiguration().parallelJS) {
+  testNegativeZeroScatter();
+}
--- a/js/src/jit-test/tests/parallelarray/bug858582.js
+++ b/js/src/jit-test/tests/parallelarray/bug858582.js
@@ -1,10 +1,11 @@
 // |jit-test| error: TypeError
 // Don't crash.
+if (getBuildConfiguration().parallelJS) {
 gczeal(2);
 evaluate("\
 function assertAlmostEq(v1, v2) {\
   print(\"v2 = \" + v2);\
   print(\"% diff = \" + percent);\
 function assertStructuralEq(e1, e2) {}\
 function assertEqParallelArrayArray(a, b) {\
     try {} catch (e) {\
@@ -57,8 +58,11 @@ function testFilter(jsarray, func, cmpFu
 	(.6  ), "v", "w", "x", "y", "z"
 	], "map", function(e) { 
 		return e != "u" 
 			&& 
 			(function b   (   )  { 
 			} )      
 			!= "x"; 
 	});
+} else {
+  throw new TypeError();
+}
--- a/js/src/jit-test/tests/parallelarray/inline-new-bad-type.js
+++ b/js/src/jit-test/tests/parallelarray/inline-new-bad-type.js
@@ -1,14 +1,18 @@
 // |jit-test| error: RangeError
-// 
+//
 // Run with --ion-eager.
-function TestCase(n, d, e, a) {};
-function reportCompare() {
-  var testcase = new TestCase("x", 0);
+if (getBuildConfiguration().parallelJS) {
+  function TestCase(n, d, e, a) {};
+  function reportCompare() {
+    var testcase = new TestCase("x", 0);
+  }
+  reportCompare();
+  TestCase = ParallelArray;
+  gczeal(6);
+  try {
+    reportCompare();
+  } catch(exc1) {}
+  reportCompare();
+} else {
+  throw new RangeError();
 }
-reportCompare();
-TestCase = ParallelArray;
-gczeal(6);
-try {
-reportCompare();
-} catch(exc1) {}
-reportCompare();