mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 887921 - Don't toggle GC write barriers in parallel execution. (r=sstangl)
This commit is contained in:
parent
66ee89e766
commit
fcd8c3ba4b
@ -5476,11 +5476,21 @@ CodeGenerator::link()
|
||||
if (callTargets.length() > 0)
|
||||
ionScript->copyCallTargetEntries(callTargets.begin());
|
||||
|
||||
// The correct state for prebarriers is unknown until the end of compilation,
|
||||
// since a GC can occur during code generation. All barriers are emitted
|
||||
// off-by-default, and are toggled on here if necessary.
|
||||
if (cx->zone()->needsBarrier())
|
||||
ionScript->toggleBarriers(true);
|
||||
switch (executionMode) {
|
||||
case SequentialExecution:
|
||||
// The correct state for prebarriers is unknown until the end of compilation,
|
||||
// since a GC can occur during code generation. All barriers are emitted
|
||||
// off-by-default, and are toggled on here if necessary.
|
||||
if (cx->zone()->needsBarrier())
|
||||
ionScript->toggleBarriers(true);
|
||||
break;
|
||||
case ParallelExecution:
|
||||
// We don't run incremental GC during parallel execution; no need to
|
||||
// turn on barriers.
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSUME_UNREACHABLE("No such execution mode");
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user