Bug 977674: IonMonkey - Only clear recompiling flag if sequentially compiling, r=jandem

This commit is contained in:
Hannes Verschore 2014-03-12 19:30:50 +01:00
Родитель 6d51c5621f
Коммит 3e6918c03f
2 изменённых файлов: 42 добавлений и 2 удалений

Просмотреть файл

@ -0,0 +1,39 @@
function testReduce() {
function sum(a, b) {
var r = a + b;
}
var array = build(8 * 0X0aaec , function() { return 1; });
var parResult = array.reducePar(sum);
}
for (var ix = 0; ix < 3; ++ix) {
testReduce();
}
function build(n, f) {
var result = [];
for (var i = 0; i < n; i++)
result.push(f(i));
return result;
}
function seq_scan(array, f) {
for (var i = 1; i < array.length; i++) {
}
}
function assertAlmostEq(v1, v2) {
if (e1 instanceof Array && e2 instanceof Array) {
for (prop in e1) {
if (e1.hasOwnProperty(prop)) { }
}
}
}
function assertEqArray(a, b) {
for (var i = 0, l = a.length; i < l; i++) {
try { } catch (e) { }
}
}
function assertParallelExecWillRecover(opFunction) {
assertParallelExecSucceeds(
function(m) {},
function(r) {}
);
}

Просмотреть файл

@ -506,8 +506,9 @@ jit::FinishOffThreadBuilder(IonBuilder *builder)
{
ExecutionMode executionMode = builder->info().executionMode();
// Clear the recompiling flag if it would have failed.
if (builder->script()->hasIonScript())
// Clear the recompiling flag of the old ionScript, since we continue to
// use the old ionScript if recompiling fails.
if (executionMode == SequentialExecution && builder->script()->hasIonScript())
builder->script()->ionScript()->clearRecompiling();
// Clean up if compilation did not succeed.