Bug 1461448 - Add gray marking phase to delayed marking phase r=sfink

This commit is contained in:
Jon Coppeard 2018-05-18 10:29:00 +01:00
Родитель c476bfba8e
Коммит 3744f8b7cb
2 изменённых файлов: 44 добавлений и 2 удалений

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

@ -88,12 +88,14 @@ PhaseKindGraphRoots = [
PhaseKind("PURGE", "Purge", 5),
PhaseKind("PURGE_SHAPE_TABLES", "Purge ShapeTables", 60),
JoinParallelTasksPhaseKind
]),
]),
PhaseKind("MARK", "Mark", 6, [
MarkRootsPhaseKind,
UnmarkGrayPhaseKind,
PhaseKind("MARK_DELAYED", "Mark Delayed", 8)
PhaseKind("MARK_DELAYED", "Mark Delayed", 8, [
UnmarkGrayPhaseKind,
]),
]),
PhaseKind("SWEEP", "Sweep", 9, [
PhaseKind("SWEEP_MARK", "Mark During Sweeping", 10, [
UnmarkGrayPhaseKind,

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

@ -0,0 +1,40 @@
if (helperThreadCount() === 0)
quit();
gczeal(0);
let lfPreamble = `
var lfOffThreadGlobal = newGlobal();
for (lfLocal in this)
try {} catch(lfVare5) {}
`;
evaluate(lfPreamble);
evaluate(`
var g = newGlobal();
var dbg = new Debugger;
var gw = dbg.addDebuggee(g);
for (lfLocal in this)
if (!(lfLocal in lfOffThreadGlobal))
try {
lfOffThreadGlobal[lfLocal] = this[lfLocal];
} catch(lfVare5) {}
var g = newGlobal();
var gw = dbg.addDebuggee(g);
`);
lfOffThreadGlobal.offThreadCompileScript(`
gcparam("markStackLimit", 1);
grayRoot()[0] = "foo";
`);
lfOffThreadGlobal.runOffThreadScript();
eval(`
var lfOffThreadGlobal = newGlobal();
try { evaluate(\`
gczeal(18, 1);
grayRoot()[0] = "foo";
let inst = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(
\\\`(module
(memory (export "memory") 1 1)
)\\\`
)));
\`); } catch(exc) {}
`);