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-01-24 19:34:44 -08:00
parent 206081e9a7
commit 417c65d7c8
13 changed files with 417 additions and 687 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");
}
}
}