本文整理汇总了C++中WeakMapBase类的典型用法代码示例。如果您正苦于以下问题:C++ WeakMapBase类的具体用法?C++ WeakMapBase怎么用?C++ WeakMapBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了WeakMapBase类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1:
void
WeakMapBase::traceAllMappings(WeakMapTracer *tracer)
{
JSRuntime *rt = tracer->context->runtime;
for (WeakMapBase *m = rt->gcWeakMapList; m; m = m->next)
m->traceMappings(tracer);
}
开发者ID:ThinkerYzu,项目名称:mozilla-central,代码行数:7,代码来源:jsweakmap.cpp
示例2: restoreMarkedWeakMaps
void WeakMapBase::restoreMarkedWeakMaps(WeakMapSet& markedWeakMaps) {
for (WeakMapSet::Range r = markedWeakMaps.all(); !r.empty(); r.popFront()) {
WeakMapBase* map = r.front();
MOZ_ASSERT(map->zone()->isGCMarking());
MOZ_ASSERT(!map->marked);
map->marked = true;
}
}
开发者ID:servo,项目名称:mozjs,代码行数:8,代码来源:WeakMap.cpp
示例3:
void
WeakMapBase::traceAllMappings(WeakMapTracer *tracer)
{
JSRuntime *rt = tracer->runtime;
for (CompartmentsIter c(rt, SkipAtoms); !c.done(); c.next()) {
for (WeakMapBase *m = c->gcWeakMapList; m; m = m->next)
m->traceMappings(tracer);
}
}
开发者ID:micadeyeye,项目名称:gecko-dev,代码行数:9,代码来源:jsweakmap.cpp
示例4:
bool
WeakMapBase::findZoneEdgesForCompartment(JSCompartment *c)
{
for (WeakMapBase *m = c->gcWeakMapList; m; m = m->next) {
if (!m->findZoneEdges())
return false;
}
return true;
}
开发者ID:Wrichik1999,项目名称:gecko-dev,代码行数:9,代码来源:jsweakmap.cpp
示例5: MOZ_ASSERT
void
WeakMapBase::markAll(JSCompartment* c, JSTracer* tracer)
{
MOZ_ASSERT(tracer->eagerlyTraceWeakMaps() != DoNotTraceWeakMaps);
for (WeakMapBase* m = c->gcWeakMapList; m; m = m->next) {
m->trace(tracer);
if (m->memberOf)
TraceEdge(tracer, &m->memberOf, "memberOf");
}
}
开发者ID:nixiValor,项目名称:Waterfox,代码行数:10,代码来源:jsweakmap.cpp
示例6:
void
WeakMapBase::traceAllMappings(WeakMapTracer* tracer)
{
JSRuntime* rt = tracer->runtime;
for (CompartmentsIter c(rt, SkipAtoms); !c.done(); c.next()) {
for (WeakMapBase* m = c->gcWeakMapList; m; m = m->next) {
// The WeakMapTracer callback is not allowed to GC.
JS::AutoSuppressGCAnalysis nogc;
m->traceMappings(tracer);
}
}
}
开发者ID:nixiValor,项目名称:Waterfox,代码行数:12,代码来源:jsweakmap.cpp
示例7: sweepZone
void WeakMapBase::sweepZone(JS::Zone* zone) {
for (WeakMapBase* m = zone->gcWeakMapList().getFirst(); m;) {
WeakMapBase* next = m->getNext();
if (m->marked) {
m->sweep();
} else {
m->clearAndCompact();
m->removeFrom(zone->gcWeakMapList());
}
m = next;
}
#ifdef DEBUG
for (WeakMapBase* m : zone->gcWeakMapList()) {
MOZ_ASSERT(m->isInList() && m->marked);
}
#endif
}
开发者ID:servo,项目名称:mozjs,代码行数:18,代码来源:WeakMap.cpp
示例8:
void
WeakMapBase::sweepZone(JS::Zone* zone)
{
for (WeakMapBase* m = zone->gcWeakMapList().getFirst(); m; ) {
WeakMapBase* next = m->getNext();
if (m->marked) {
m->sweep();
} else {
/* Destroy the hash map now to catch any use after this point. */
m->finish();
m->removeFrom(zone->gcWeakMapList());
}
m = next;
}
#ifdef DEBUG
for (WeakMapBase* m : zone->gcWeakMapList())
MOZ_ASSERT(m->isInList() && m->marked);
#endif
}
开发者ID:luke-chang,项目名称:gecko-1,代码行数:20,代码来源:jsweakmap.cpp
注:本文中的WeakMapBase类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论