Bug 721463 - Clean up and minimize marking interfaces; r=billm

Currently, the marking interfaces are a giant pile of duplicated and,
frequently, unused code.  This patch reworks the interface to clean
up jsgcmark.h.
This commit is contained in:
Terrence Cole
2012-02-14 09:10:23 -08:00
parent 7a7e6db2be
commit 3396b5b18b
14 changed files with 439 additions and 668 deletions

View File

@@ -386,16 +386,15 @@ js_TraceAtomState(JSTracer *trc)
JSAtomState *state = &rt->atomState;
if (rt->gcKeepAtoms) {
for (AtomSet::Range r = state->atoms.all(); !r.empty(); r.popFront()) {
MarkRoot(trc, r.front().asPtr(), "locked_atom");
}
for (AtomSet::Range r = state->atoms.all(); !r.empty(); r.popFront())
MarkStringRoot(trc, r.front().asPtr(), "locked_atom");
} else {
for (AtomSet::Range r = state->atoms.all(); !r.empty(); r.popFront()) {
AtomStateEntry entry = r.front();
if (!entry.isTagged())
continue;
MarkRoot(trc, entry.asPtr(), "interned_atom");
MarkStringRoot(trc, entry.asPtr(), "interned_atom");
}
}
}