Bug 861705 - Check for ParallelArray being disabled in various tests r=sstangl

This commit is contained in:
Nicholas D. Matsakis 2013-04-18 05:53:53 -04:00
parent 51e7d62749
commit 064413bc86
18 changed files with 96 additions and 45 deletions

View File

@ -2,6 +2,8 @@
// 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(","));
}

View File

@ -1,4 +1,6 @@
// Binary: cache/js-dbg-64-35b8d6ef5d46-linux
// Flags:
//
print(ParallelArray());
if (getBuildConfiguration().parallelJS)
print(ParallelArray());

View File

@ -2,5 +2,7 @@
// 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 })
}

View File

@ -4,5 +4,9 @@
// 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();
}

View File

@ -2,5 +2,7 @@
// 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; });
}

View File

@ -1,4 +1,7 @@
// Binary: cache/js-dbg-64-5d63594c05a9-linux
// Flags:
//
ParallelArray().watch("shape", function() {})
if (getBuildConfiguration().parallelJS) {
ParallelArray().watch("shape", function() {})
}

View File

@ -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(){}))
}

View File

@ -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();
}

View File

@ -15,4 +15,8 @@ function testMonitorIntrinsic() {
}
}
testMonitorIntrinsic();
if (getBuildConfiguration().parallelJS) {
testMonitorIntrinsic();
} else {
throw new TypeError();
}

View File

@ -7,4 +7,6 @@ function testScatterConflict() {
assertEq(a instanceof ParallelArray, true);
assertEqParallelArray(r, new ParallelArray([4,2,(false),4,5]));
}
testScatterConflict();
if (getBuildConfiguration().parallelJS) {
testScatterConflict();
}

View File

@ -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; });
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();

View File

@ -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;
}
}

View File

@ -1,2 +1,3 @@
// Don't crash.
ParallelArray(7, function ([y]) {})
if (getBuildConfiguration().parallelJS)
ParallelArray(7, function ([y]) {})

View File

@ -6,4 +6,5 @@ function bug854050() {
ParallelArray(47, x);
}
bug854050();
if (getBuildConfiguration().parallelJS)
bug854050();

View File

@ -15,4 +15,6 @@ function bug854381() {
print(toString(r));
}
bug854381();
if (getBuildConfiguration().parallelJS) {
bug854381();
}

View File

@ -4,4 +4,6 @@ function testNegativeZeroScatter() {
var r = p.scatter([-0], 0, undefined, 1);
}
testNegativeZeroScatter();
if (getBuildConfiguration().parallelJS) {
testNegativeZeroScatter();
}

View File

@ -1,5 +1,6 @@
// |jit-test| error: TypeError
// Don't crash.
if (getBuildConfiguration().parallelJS) {
gczeal(2);
evaluate("\
function assertAlmostEq(v1, v2) {\
@ -62,3 +63,6 @@ function testFilter(jsarray, func, cmpFunction) {}\
} )
!= "x";
});
} else {
throw new TypeError();
}

View File

@ -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();