本文整理汇总了C++中JSRuntime::isHeapCompacting方法的典型用法代码示例。如果您正苦于以下问题:C++ JSRuntime::isHeapCompacting方法的具体用法?C++ JSRuntime::isHeapCompacting怎么用?C++ JSRuntime::isHeapCompacting使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSRuntime
的用法示例。
在下文中一共展示了JSRuntime::isHeapCompacting方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ap
void
JSCompartment::sweep(FreeOp *fop, bool releaseTypes)
{
JS_ASSERT(!activeAnalysis);
JSRuntime *rt = runtimeFromMainThread();
{
gcstats::MaybeAutoPhase ap(rt->gc.stats, !rt->isHeapCompacting(),
gcstats::PHASE_SWEEP_TABLES_INNER_VIEWS);
innerViews.sweep(rt);
}
{
gcstats::MaybeAutoPhase ap(rt->gc.stats, !rt->isHeapCompacting(),
gcstats::PHASE_SWEEP_TABLES_WRAPPER);
sweepCrossCompartmentWrappers();
}
/* Remove dead references held weakly by the compartment. */
sweepBaseShapeTable();
sweepInitialShapeTable();
{
gcstats::MaybeAutoPhase ap(rt->gc.stats, !rt->isHeapCompacting(),
gcstats::PHASE_SWEEP_TABLES_TYPE_OBJECT);
sweepNewTypeObjectTable(newTypeObjects);
sweepNewTypeObjectTable(lazyTypeObjects);
}
sweepCallsiteClones();
savedStacks_.sweep(rt);
if (global_ && IsObjectAboutToBeFinalized(global_.unsafeGet())) {
if (debugMode())
Debugger::detachAllDebuggersFromGlobal(fop, global_);
global_.set(nullptr);
}
if (selfHostingScriptSource &&
IsObjectAboutToBeFinalized((JSObject **) selfHostingScriptSource.unsafeGet()))
{
selfHostingScriptSource.set(nullptr);
}
if (jitCompartment_)
jitCompartment_->sweep(fop, this);
/*
* JIT code increments activeWarmUpCounter for any RegExpShared used by jit
* code for the lifetime of the JIT script. Thus, we must perform
* sweeping after clearing jit code.
*/
regExps.sweep(rt);
if (debugScopes)
debugScopes->sweep(rt);
/* Finalize unreachable (key,value) pairs in all weak maps. */
WeakMapBase::sweepCompartment(this);
/* Sweep list of native iterators. */
NativeIterator *ni = enumerators->next();
while (ni != enumerators) {
JSObject *iterObj = ni->iterObj();
NativeIterator *next = ni->next();
if (gc::IsObjectAboutToBeFinalized(&iterObj))
ni->unlink();
ni = next;
}
}