本文整理汇总了C++中RelocationOverlay类的典型用法代码示例。如果您正苦于以下问题:C++ RelocationOverlay类的具体用法?C++ RelocationOverlay怎么用?C++ RelocationOverlay使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了RelocationOverlay类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: traceObject
void
js::Nursery::collectToFixedPoint(MinorCollectionTracer *trc)
{
for (RelocationOverlay *p = trc->head; p; p = p->next()) {
JSObject *obj = static_cast<JSObject*>(p->forwardingAddress());
traceObject(trc, obj);
}
}
示例2: traceObject
void
js::Nursery::collectToFixedPoint(MinorCollectionTracer *trc, TenureCountCache &tenureCounts)
{
for (RelocationOverlay *p = trc->head; p; p = p->next()) {
JSObject *obj = static_cast<JSObject*>(p->forwardingAddress());
traceObject(trc, obj);
TenureCount &entry = tenureCounts.findEntry(obj->type());
if (entry.type == obj->type()) {
entry.count++;
} else if (!entry.type) {
entry.type = obj->type();
entry.count = 1;
}
}
}
示例3: getObjectAllocKind
void *
ForkJoinNursery::moveObjectToTospace(JSObject *src)
{
AllocKind dstKind = getObjectAllocKind(src);
JSObject *dst = static_cast<JSObject *>(allocateInTospace(dstKind));
if (!dst)
CrashAtUnhandlableOOM("Failed to allocate object while moving object.");
movedSize_ += copyObjectToTospace(dst, src, dstKind);
RelocationOverlay *overlay = reinterpret_cast<RelocationOverlay *>(src);
overlay->forwardTo(dst);
insertIntoFixupList(overlay);
return static_cast<void *>(dst);
}
示例4: GetObjectAllocKindForCopy
void *
js::Nursery::moveToTenured(MinorCollectionTracer *trc, JSObject *src)
{
Zone *zone = src->zone();
AllocKind dstKind = GetObjectAllocKindForCopy(trc->runtime(), src);
JSObject *dst = static_cast<JSObject *>(allocateFromTenured(zone, dstKind));
if (!dst)
CrashAtUnhandlableOOM("Failed to allocate object while tenuring.");
trc->tenuredSize += moveObjectToTenured(dst, src, dstKind);
RelocationOverlay *overlay = reinterpret_cast<RelocationOverlay *>(src);
overlay->forwardTo(dst);
trc->insertIntoFixupList(overlay);
return static_cast<void *>(dst);
}
示例5: traceObject
void
js::Nursery::collectToFixedPoint(MinorCollectionTracer *trc)
{
for (RelocationOverlay *p = trc->head; p; p = p->next()) {
JSObject *obj = static_cast<JSObject*>(p->forwardingAddress());
traceObject(trc, obj);
/*
* Increment tenure count and recompile the script for pre-tenuring if
* long-lived. Attempt to distinguish between tenuring because the
* object is long lived and tenuring while the nursery is still
* smaller than the working set size.
*/
if (isFullyGrown() && !obj->hasLazyType() && obj->type()->hasNewScript() &&
obj->type()->incrementTenureCount())
{
MaybeInvalidateScriptUsedWithNew(trc->runtime, obj->type());
}
}
}
示例6: traceObject
void
ForkJoinNursery::collectToFixedPoint(ForkJoinNurseryCollectionTracer *trc)
{
for (RelocationOverlay *p = head_; p; p = p->next())
traceObject(trc, static_cast<JSObject *>(p->forwardingAddress()));
}