本文整理汇总了C++中MarkStack类的典型用法代码示例。如果您正苦于以下问题:C++ MarkStack类的具体用法?C++ MarkStack怎么用?C++ MarkStack使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MarkStack类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool ImmixGC::ObjectDescriber::mark_address(Address addr, MarkStack& ms, bool push) {
Object* obj = addr.as<Object>();
if(obj->marked_p(memory_->mark())) return false;
obj->mark(memory_, memory_->mark());
if(push) ms.push_back(addr);
// If this is a young object, let the GC know not to try and mark
// the block it's in.
return obj->in_immix_p();
}
示例2: markDOMObjectWrapper
void markDOMObjectWrapper(MarkStack& markStack, JSGlobalData& globalData, void* object)
{
// FIXME: This could be changed to only mark wrappers that are "observable"
// as markDOMNodesForDocument does, allowing us to collect more wrappers,
// but doing this correctly would be challenging.
if (!object)
return;
for (JSGlobalDataWorldIterator worldIter(&globalData); worldIter; ++worldIter) {
if (HandleSlot wrapperSlot = worldIter->m_wrappers.getSlot(object))
markStack.deprecatedAppend(wrapperSlot);
}
}
示例3: markDOMNodesForDocument
void markDOMNodesForDocument(MarkStack& markStack, Document* document)
{
JSWrapperCacheMap& wrapperCacheMap = document->wrapperCacheMap();
for (JSWrapperCacheMap::iterator wrappersIter = wrapperCacheMap.begin(); wrappersIter != wrapperCacheMap.end(); ++wrappersIter) {
DOMWrapperWorld* world = wrappersIter->first;
JSWrapperCache* nodeDict = wrappersIter->second;
JSWrapperCache::iterator nodeEnd = nodeDict->end();
for (JSWrapperCache::iterator nodeIt = nodeDict->begin(); nodeIt != nodeEnd; ++nodeIt) {
if (isObservableThroughDOM(nodeIt.get().second, world))
markStack.deprecatedAppend(nodeIt.getSlot().second);
}
}
}
示例4: markDOMNodesForDocument
void markDOMNodesForDocument(MarkStack& markStack, Document* document)
{
JSWrapperCacheMap& wrapperCacheMap = document->wrapperCacheMap();
for (JSWrapperCacheMap::iterator wrappersIter = wrapperCacheMap.begin(); wrappersIter != wrapperCacheMap.end(); ++wrappersIter) {
DOMWrapperWorld* world = wrappersIter->first;
JSWrapperCache* nodeDict = wrappersIter->second;
JSWrapperCache::iterator nodeEnd = nodeDict->uncheckedEnd();
for (JSWrapperCache::iterator nodeIt = nodeDict->uncheckedBegin(); nodeIt != nodeEnd; ++nodeIt) {
DeprecatedPtr<JSNode>& jsNode = nodeIt->second;
if (isObservableThroughDOM(jsNode.get(), world))
markStack.append(&jsNode);
}
}
}
示例5: markChildren
void JSPropertyNameIterator::markChildren(MarkStack& markStack)
{
markStack.appendValues(m_jsStrings.get(), m_jsStringsSize, MayContainNullValues);
}
示例6: markChildren
void JSGlobalObject::markChildren(MarkStack& markStack)
{
JSVariableObject::markChildren(markStack);
HashSet<GlobalCodeBlock*>::const_iterator end = codeBlocks().end();
for (HashSet<GlobalCodeBlock*>::const_iterator it = codeBlocks().begin(); it != end; ++it)
(*it)->markAggregate(markStack);
RegisterFile& registerFile = globalData()->interpreter->registerFile();
if (registerFile.globalObject() == this)
registerFile.markGlobals(markStack, &globalData()->heap);
markIfNeeded(markStack, d()->regExpConstructor);
markIfNeeded(markStack, d()->errorConstructor);
markIfNeeded(markStack, d()->evalErrorConstructor);
markIfNeeded(markStack, d()->rangeErrorConstructor);
markIfNeeded(markStack, d()->referenceErrorConstructor);
markIfNeeded(markStack, d()->syntaxErrorConstructor);
markIfNeeded(markStack, d()->typeErrorConstructor);
markIfNeeded(markStack, d()->URIErrorConstructor);
markIfNeeded(markStack, d()->evalFunction);
markIfNeeded(markStack, d()->callFunction);
markIfNeeded(markStack, d()->applyFunction);
markIfNeeded(markStack, d()->objectPrototype);
markIfNeeded(markStack, d()->functionPrototype);
markIfNeeded(markStack, d()->arrayPrototype);
markIfNeeded(markStack, d()->booleanPrototype);
markIfNeeded(markStack, d()->stringPrototype);
markIfNeeded(markStack, d()->numberPrototype);
markIfNeeded(markStack, d()->datePrototype);
markIfNeeded(markStack, d()->regExpPrototype);
markIfNeeded(markStack, d()->methodCallDummy);
markIfNeeded(markStack, d()->errorStructure);
markIfNeeded(markStack, d()->argumentsStructure);
markIfNeeded(markStack, d()->arrayStructure);
markIfNeeded(markStack, d()->booleanObjectStructure);
markIfNeeded(markStack, d()->callbackConstructorStructure);
markIfNeeded(markStack, d()->callbackFunctionStructure);
markIfNeeded(markStack, d()->callbackObjectStructure);
markIfNeeded(markStack, d()->dateStructure);
markIfNeeded(markStack, d()->emptyObjectStructure);
markIfNeeded(markStack, d()->errorStructure);
markIfNeeded(markStack, d()->functionStructure);
markIfNeeded(markStack, d()->numberObjectStructure);
markIfNeeded(markStack, d()->prototypeFunctionStructure);
markIfNeeded(markStack, d()->regExpMatchesArrayStructure);
markIfNeeded(markStack, d()->regExpStructure);
markIfNeeded(markStack, d()->stringObjectStructure);
// No need to mark the other structures, because their prototypes are all
// guaranteed to be referenced elsewhere.
Register* registerArray = d()->registerArray.get();
if (!registerArray)
return;
size_t size = d()->registerArraySize;
markStack.appendValues(reinterpret_cast<JSValue*>(registerArray), size);
}
示例7: markIfNeeded
static inline void markIfNeeded(MarkStack& markStack, JSValue v)
{
if (v)
markStack.append(v);
}
示例8: markAggregate
void JSNodeFilterCondition::markAggregate(MarkStack& markStack)
{
markStack.append(m_filter);
}
示例9: markChildren
void JSStaticScopeObject::markChildren(MarkStack& markStack)
{
JSVariableObject::markChildren(markStack);
markStack.deprecatedAppend(&d()->registerStore);
}
示例10: markJSFunction
void JSEventListener::markJSFunction(MarkStack& markStack)
{
if (m_jsFunction)
markStack.append(m_jsFunction);
}
示例11: markChildren
void JSStaticScopeObject::markChildren(MarkStack& markStack)
{
JSVariableObject::markChildren(markStack);
markStack.append(d()->registerStore.jsValue());
}
示例12: markChildren
// Marking
void JSNotAnObject::markChildren(MarkStack& markStack)
{
TiObject::markChildren(markStack);
markStack.append(m_exception);
}
示例13: markChildren
void NativeErrorConstructor::markChildren(MarkStack& markStack)
{
InternalFunction::markChildren(markStack);
if (m_errorStructure)
markStack.append(&m_errorStructure);
}
示例14: markChildren
void GlobalEvalFunction::markChildren(MarkStack& markStack)
{
PrototypeFunction::markChildren(markStack);
markStack.append(m_cachedGlobalObject);
}
示例15: markChildren
void JSDOMWindowShell::markChildren(MarkStack& markStack)
{
Base::markChildren(markStack);
if (m_window)
markStack.append(&m_window);
}