Commit 433d02f9 authored by oliver@apple.com's avatar oliver@apple.com

2011-04-21 Oliver Hunt <oliver@apple.com>

        Reviewed by Geoffrey Garen.

        Start moving to a general visitor pattern for GC traversal
        https://bugs.webkit.org/show_bug.cgi?id=59141

        This is just a rename:
            markChildren -> visitChildren
            markAggregate -> visitAggregate
            markStack -> visitor
            MarkStack -> typedef'd to SlotVisitor

        * API/JSCallbackObject.h:
        (JSC::JSCallbackObjectData::visitChildren):
        (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
        (JSC::JSCallbackObject::visitChildren):
        * JavaScriptCore.exp:
        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::visitStructures):
        (JSC::EvalCodeCache::visitAggregate):
        (JSC::CodeBlock::visitAggregate):
        * bytecode/CodeBlock.h:
        * bytecode/EvalCodeCache.h:
        * bytecode/Instruction.h:
        (JSC::PolymorphicAccessStructureList::visitAggregate):
        * bytecode/StructureStubInfo.cpp:
        (JSC::StructureStubInfo::visitAggregate):
        * bytecode/StructureStubInfo.h:
        * debugger/DebuggerActivation.cpp:
        (JSC::DebuggerActivation::visitChildren):
        * debugger/DebuggerActivation.h:
        * heap/HandleHeap.cpp:
        (JSC::WeakHandleOwner::isReachableFromOpaqueRoots):
        (JSC::HandleHeap::markStrongHandles):
        (JSC::HandleHeap::markWeakHandles):
        * heap/HandleHeap.h:
        * heap/HandleStack.cpp:
        (JSC::HandleStack::mark):
        * heap/HandleStack.h:
        * heap/Heap.cpp:
        (JSC::Heap::markProtectedObjects):
        (JSC::Heap::markTempSortVectors):
        (JSC::Heap::markRoots):
        * heap/Heap.h:
        * heap/MarkStack.cpp:
        (JSC::MarkStack::visitChildren):
        (JSC::MarkStack::drain):
        * heap/MarkStack.h:
        (JSC::HeapRootVisitor::HeapRootVisitor):
        (JSC::HeapRootVisitor::mark):
        (JSC::HeapRootVisitor::visitor):
        * heap/MarkedSpace.h:
        * runtime/ArgList.cpp:
        (JSC::MarkedArgumentBuffer::markLists):
        * runtime/ArgList.h:
        * runtime/Arguments.cpp:
        (JSC::Arguments::visitChildren):
        * runtime/Arguments.h:
        * runtime/Executable.cpp:
        (JSC::EvalExecutable::visitChildren):
        (JSC::ProgramExecutable::visitChildren):
        (JSC::FunctionExecutable::visitChildren):
        * runtime/Executable.h:
        * runtime/GetterSetter.cpp:
        (JSC::GetterSetter::visitChildren):
        * runtime/GetterSetter.h:
        (JSC::GetterSetter::createStructure):
        * runtime/JSAPIValueWrapper.h:
        (JSC::JSAPIValueWrapper::createStructure):
        * runtime/JSActivation.cpp:
        (JSC::JSActivation::visitChildren):
        * runtime/JSActivation.h:
        * runtime/JSArray.cpp:
        (JSC::JSArray::visitChildren):
        * runtime/JSArray.h:
        (JSC::JSArray::visitDirect):
        * runtime/JSCell.h:
        (JSC::JSCell::JSCell::visitChildren):
        * runtime/JSFunction.cpp:
        (JSC::JSFunction::visitChildren):
        * runtime/JSFunction.h:
        * runtime/JSGlobalObject.cpp:
        (JSC::visitIfNeeded):
        (JSC::JSGlobalObject::visitChildren):
        * runtime/JSGlobalObject.h:
        * runtime/JSONObject.cpp:
        * runtime/JSObject.cpp:
        (JSC::JSObject::visitChildren):
        * runtime/JSObject.h:
        (JSC::JSObject::visitDirect):
        * runtime/JSPropertyNameIterator.cpp:
        (JSC::JSPropertyNameIterator::visitChildren):
        * runtime/JSPropertyNameIterator.h:
        (JSC::JSPropertyNameIterator::createStructure):
        * runtime/JSStaticScopeObject.cpp:
        (JSC::JSStaticScopeObject::visitChildren):
        * runtime/JSStaticScopeObject.h:
        * runtime/JSTypeInfo.h:
        (JSC::TypeInfo::TypeInfo):
        (JSC::TypeInfo::overridesVisitChildren):
        * runtime/JSWrapperObject.cpp:
        (JSC::JSWrapperObject::visitChildren):
        * runtime/JSWrapperObject.h:
        * runtime/JSZombie.h:
        (JSC::JSZombie::visitChildren):
        * runtime/NativeErrorConstructor.cpp:
        (JSC::NativeErrorConstructor::visitChildren):
        * runtime/NativeErrorConstructor.h:
        * runtime/RegExpObject.cpp:
        (JSC::RegExpObject::visitChildren):
        * runtime/RegExpObject.h:
        * runtime/ScopeChain.cpp:
        (JSC::ScopeChainNode::visitChildren):
        * runtime/ScopeChain.h:
        * runtime/SmallStrings.cpp:
        (JSC::SmallStrings::visitChildren):
        * runtime/SmallStrings.h:
        * runtime/Structure.cpp:
        (JSC::Structure::Structure):
        (JSC::Structure::visitChildren):
        * runtime/Structure.h:
        * runtime/StructureChain.cpp:
        (JSC::StructureChain::visitChildren):
        * runtime/StructureChain.h:
        (JSC::StructureChain::createStructure):
2011-04-21  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoffrey Garen.

        Start moving to a general visitor pattern for GC traversal
        https://bugs.webkit.org/show_bug.cgi?id=59141

        This is just a rename:
            markChildren -> visitChildren
            markAggregate -> visitAggregate
            markStack -> visitor
            MarkStack -> typedef'd to SlotVisitor

        * UserObjectImp.cpp:
        (UserObjectImp::visitChildren):
2011-04-21  Oliver Hunt  <oliver@apple.com>

        Reviewed by Geoffrey Garen.

        Start moving to a general visitor pattern for GC traversal
        https://bugs.webkit.org/show_bug.cgi?id=59141

        This is just a rename:
            markChildren -> visitChildren
            markAggregate -> visitAggregate
            markStack -> visitor
            MarkStack -> typedef'd to SlotVisitor

        * bindings/js/JSAttrCustom.cpp:
        (WebCore::JSAttr::visitChildren):
        * bindings/js/JSAudioConstructor.cpp:
        (WebCore::constructAudio):
        * bindings/js/JSCSSRuleCustom.cpp:
        (WebCore::JSCSSRule::visitChildren):
        * bindings/js/JSCSSStyleDeclarationCustom.cpp:
        (WebCore::JSCSSStyleDeclaration::visitChildren):
        * bindings/js/JSDOMBinding.cpp:
        (WebCore::visitActiveObjectsForContext):
        (WebCore::markDOMObjectWrapper):
        * bindings/js/JSDOMBinding.h:
        * bindings/js/JSDOMGlobalObject.cpp:
        (WebCore::JSDOMGlobalObject::visitChildren):
        * bindings/js/JSDOMGlobalObject.h:
        * bindings/js/JSDOMImplementationCustom.cpp:
        (WebCore::JSDOMImplementation::visitChildren):
        * bindings/js/JSDOMWindowCustom.cpp:
        (WebCore::JSDOMWindow::visitChildren):
        * bindings/js/JSDOMWindowShell.cpp:
        (WebCore::JSDOMWindowShell::visitChildren):
        * bindings/js/JSDOMWindowShell.h:
        * bindings/js/JSDocumentCustom.cpp:
        (WebCore::JSDocument::visitChildren):
        * bindings/js/JSElementCustom.cpp:
        (WebCore::JSElement::visitChildren):
        * bindings/js/JSEventListener.cpp:
        (WebCore::JSEventListener::markJSFunction):
        * bindings/js/JSEventListener.h:
        * bindings/js/JSHTMLCanvasElementCustom.cpp:
        (WebCore::JSHTMLCanvasElement::visitChildren):
        * bindings/js/JSHTMLLinkElementCustom.cpp:
        (WebCore::JSHTMLLinkElement::visitChildren):
        * bindings/js/JSHTMLStyleElementCustom.cpp:
        (WebCore::JSHTMLStyleElement::visitChildren):
        * bindings/js/JSImageConstructor.cpp:
        (WebCore::constructImage):
        * bindings/js/JSJavaScriptAudioNodeCustom.cpp:
        (WebCore::JSJavaScriptAudioNode::visitChildren):
        * bindings/js/JSMessageChannelCustom.cpp:
        (WebCore::JSMessageChannel::visitChildren):
        * bindings/js/JSMessagePortCustom.cpp:
        (WebCore::JSMessagePort::visitChildren):
        * bindings/js/JSNamedNodeMapCustom.cpp:
        (WebCore::JSNamedNodeMapOwner::isReachableFromOpaqueRoots):
        (WebCore::JSNamedNodeMap::visitChildren):
        * bindings/js/JSNavigatorCustom.cpp:
        (WebCore::JSNavigator::visitChildren):
        * bindings/js/JSNodeCustom.cpp:
        (WebCore::isObservable):
        (WebCore::isReachableFromDOM):
        (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
        (WebCore::JSNode::visitChildren):
        * bindings/js/JSNodeCustom.h:
        * bindings/js/JSNodeFilterCondition.cpp:
        (WebCore::JSNodeFilterCondition::WeakOwner::isReachableFromOpaqueRoots):
        * bindings/js/JSNodeFilterCondition.h:
        * bindings/js/JSNodeFilterCustom.cpp:
        (WebCore::JSNodeFilter::visitChildren):
        * bindings/js/JSNodeIteratorCustom.cpp:
        (WebCore::JSNodeIterator::visitChildren):
        * bindings/js/JSNodeListCustom.cpp:
        (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
        * bindings/js/JSProcessingInstructionCustom.cpp:
        (WebCore::JSProcessingInstruction::visitChildren):
        * bindings/js/JSSVGElementInstanceCustom.cpp:
        (WebCore::JSSVGElementInstance::visitChildren):
        * bindings/js/JSSharedWorkerCustom.cpp:
        (WebCore::JSSharedWorker::visitChildren):
        * bindings/js/JSStyleSheetCustom.cpp:
        (WebCore::JSStyleSheet::visitChildren):
        * bindings/js/JSTreeWalkerCustom.cpp:
        (WebCore::JSTreeWalker::visitChildren):
        * bindings/js/JSWebGLRenderingContextCustom.cpp:
        (WebCore::JSWebGLRenderingContext::visitChildren):
        * bindings/js/JSWebKitAnimationListCustom.cpp:
        (WebCore::JSWebKitAnimationList::visitChildren):
        * bindings/js/JSWorkerContextCustom.cpp:
        (WebCore::JSWorkerContext::visitChildren):
        * bindings/js/JSXMLHttpRequestCustom.cpp:
        (WebCore::JSXMLHttpRequest::visitChildren):
        * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
        (WebCore::JSXMLHttpRequestUpload::visitChildren):
        * bindings/scripts/CodeGeneratorJS.pm:
        * bridge/qt/qt_instance.cpp:
        (JSC::Bindings::QtRuntimeObject::visitChildren):
        (JSC::Bindings::QtInstance::markAggregate):
        * bridge/qt/qt_instance.h:
        * bridge/qt/qt_pixmapruntime.cpp:
        * bridge/qt/qt_runtime.cpp:
        (JSC::Bindings::QtRuntimeMetaMethod::visitChildren):
        * bridge/qt/qt_runtime.h:
        * dom/EventListener.h:
        (WebCore::EventListener::visitJSFunction):
        * dom/EventTarget.h:
        (WebCore::EventTarget::visitJSEventListeners):
        * dom/Node.h:
        * dom/NodeFilterCondition.h:
        (WebCore::NodeFilterCondition::visitAggregate):
        * page/DOMWindow.h:
        * workers/WorkerContext.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4ecbacd7
......@@ -68,11 +68,11 @@ struct JSCallbackObjectData : WeakHandleOwner {
m_privateProperties->deletePrivateProperty(propertyName);
}
void markChildren(MarkStack& markStack)
void visitChildren(SlotVisitor& visitor)
{
if (!m_privateProperties)
return;
m_privateProperties->markChildren(markStack);
m_privateProperties->visitChildren(visitor);
}
void* privateData;
......@@ -97,11 +97,11 @@ struct JSCallbackObjectData : WeakHandleOwner {
m_propertyMap.remove(propertyName.impl());
}
void markChildren(MarkStack& markStack)
void visitChildren(SlotVisitor& visitor)
{
for (PrivatePropertyMap::iterator ptr = m_propertyMap.begin(); ptr != m_propertyMap.end(); ++ptr) {
if (ptr->second)
markStack.append(&ptr->second);
visitor.append(&ptr->second);
}
}
......@@ -149,7 +149,7 @@ public:
}
protected:
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesHasInstance | OverridesMarkChildren | OverridesGetPropertyNames | Base::StructureFlags;
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | OverridesHasInstance | OverridesVisitChildren | OverridesGetPropertyNames | Base::StructureFlags;
private:
virtual UString className() const;
......@@ -172,10 +172,10 @@ private:
virtual ConstructType getConstructData(ConstructData&);
virtual CallType getCallData(CallData&);
virtual void markChildren(MarkStack& markStack)
virtual void visitChildren(SlotVisitor& visitor)
{
Base::markChildren(markStack);
m_callbackObjectData->markChildren(markStack);
Base::visitChildren(visitor);
m_callbackObjectData->visitChildren(visitor);
}
void init(ExecState*);
......
2011-04-21 Oliver Hunt <oliver@apple.com>
Reviewed by Geoffrey Garen.
Start moving to a general visitor pattern for GC traversal
https://bugs.webkit.org/show_bug.cgi?id=59141
This is just a rename:
markChildren -> visitChildren
markAggregate -> visitAggregate
markStack -> visitor
MarkStack -> typedef'd to SlotVisitor
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::visitChildren):
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
(JSC::JSCallbackObject::visitChildren):
* JavaScriptCore.exp:
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::visitStructures):
(JSC::EvalCodeCache::visitAggregate):
(JSC::CodeBlock::visitAggregate):
* bytecode/CodeBlock.h:
* bytecode/EvalCodeCache.h:
* bytecode/Instruction.h:
(JSC::PolymorphicAccessStructureList::visitAggregate):
* bytecode/StructureStubInfo.cpp:
(JSC::StructureStubInfo::visitAggregate):
* bytecode/StructureStubInfo.h:
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::visitChildren):
* debugger/DebuggerActivation.h:
* heap/HandleHeap.cpp:
(JSC::WeakHandleOwner::isReachableFromOpaqueRoots):
(JSC::HandleHeap::markStrongHandles):
(JSC::HandleHeap::markWeakHandles):
* heap/HandleHeap.h:
* heap/HandleStack.cpp:
(JSC::HandleStack::mark):
* heap/HandleStack.h:
* heap/Heap.cpp:
(JSC::Heap::markProtectedObjects):
(JSC::Heap::markTempSortVectors):
(JSC::Heap::markRoots):
* heap/Heap.h:
* heap/MarkStack.cpp:
(JSC::MarkStack::visitChildren):
(JSC::MarkStack::drain):
* heap/MarkStack.h:
(JSC::HeapRootVisitor::HeapRootVisitor):
(JSC::HeapRootVisitor::mark):
(JSC::HeapRootVisitor::visitor):
* heap/MarkedSpace.h:
* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::markLists):
* runtime/ArgList.h:
* runtime/Arguments.cpp:
(JSC::Arguments::visitChildren):
* runtime/Arguments.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::visitChildren):
(JSC::ProgramExecutable::visitChildren):
(JSC::FunctionExecutable::visitChildren):
* runtime/Executable.h:
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::visitChildren):
* runtime/GetterSetter.h:
(JSC::GetterSetter::createStructure):
* runtime/JSAPIValueWrapper.h:
(JSC::JSAPIValueWrapper::createStructure):
* runtime/JSActivation.cpp:
(JSC::JSActivation::visitChildren):
* runtime/JSActivation.h:
* runtime/JSArray.cpp:
(JSC::JSArray::visitChildren):
* runtime/JSArray.h:
(JSC::JSArray::visitDirect):
* runtime/JSCell.h:
(JSC::JSCell::JSCell::visitChildren):
* runtime/JSFunction.cpp:
(JSC::JSFunction::visitChildren):
* runtime/JSFunction.h:
* runtime/JSGlobalObject.cpp:
(JSC::visitIfNeeded):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
* runtime/JSONObject.cpp:
* runtime/JSObject.cpp:
(JSC::JSObject::visitChildren):
* runtime/JSObject.h:
(JSC::JSObject::visitDirect):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::visitChildren):
* runtime/JSPropertyNameIterator.h:
(JSC::JSPropertyNameIterator::createStructure):
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::visitChildren):
* runtime/JSStaticScopeObject.h:
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::TypeInfo):
(JSC::TypeInfo::overridesVisitChildren):
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::visitChildren):
* runtime/JSWrapperObject.h:
* runtime/JSZombie.h:
(JSC::JSZombie::visitChildren):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::visitChildren):
* runtime/NativeErrorConstructor.h:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::visitChildren):
* runtime/RegExpObject.h:
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::visitChildren):
* runtime/ScopeChain.h:
* runtime/SmallStrings.cpp:
(JSC::SmallStrings::visitChildren):
* runtime/SmallStrings.h:
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::visitChildren):
* runtime/Structure.h:
* runtime/StructureChain.cpp:
(JSC::StructureChain::visitChildren):
* runtime/StructureChain.h:
(JSC::StructureChain::createStructure):
2011-04-21 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r84548.
......
......@@ -156,7 +156,7 @@ __ZN3JSC13StatementNode6setLocEii
__ZN3JSC14JSGlobalObject10globalExecEv
__ZN3JSC14JSGlobalObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectEj
__ZN3JSC14JSGlobalObject12defineSetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectEj
__ZN3JSC14JSGlobalObject12markChildrenERNS_9MarkStackE
__ZN3JSC14JSGlobalObject13visitChildrenERNS_9MarkStackE
__ZN3JSC14JSGlobalObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj
__ZN3JSC14JSGlobalObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
__ZN3JSC14JSGlobalObject4initEPNS_8JSObjectE
......@@ -168,7 +168,7 @@ __ZN3JSC14SamplingThread5startEj
__ZN3JSC14TimeoutChecker10didTimeOutEPNS_9ExecStateE
__ZN3JSC14TimeoutChecker5resetEv
__ZN3JSC14throwTypeErrorEPNS_9ExecStateE
__ZN3JSC15JSWrapperObject12markChildrenERNS_9MarkStackE
__ZN3JSC15JSWrapperObject13visitChildrenERNS_9MarkStackE
__ZN3JSC15WeakHandleOwner26isReachableFromOpaqueRootsENS_6HandleINS_7UnknownEEEPvRNS_9MarkStackE
__ZN3JSC15WeakHandleOwner8finalizeENS_6HandleINS_7UnknownEEEPv
__ZN3JSC15WeakHandleOwnerD2Ev
......@@ -252,7 +252,7 @@ __ZN3JSC6JSLock9lockCountEv
__ZN3JSC6JSLockC1EPNS_9ExecStateE
__ZN3JSC6RegExp6createEPNS_12JSGlobalDataERKNS_7UStringENS_11RegExpFlagsE
__ZN3JSC6RegExpD1Ev
__ZN3JSC7JSArray12markChildrenERNS_9MarkStackE
__ZN3JSC7JSArray13visitChildrenERNS_9MarkStackE
__ZN3JSC7JSArray15setSubclassDataEPv
__ZN3JSC7JSArray18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC7JSArray6s_infoE
......@@ -284,7 +284,7 @@ __ZN3JSC8JSObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPS0_j
__ZN3JSC8JSObject12defineSetterEPNS_9ExecStateERKNS_10IdentifierEPS0_j
__ZN3JSC8JSObject12lookupGetterEPNS_9ExecStateERKNS_10IdentifierE
__ZN3JSC8JSObject12lookupSetterEPNS_9ExecStateERKNS_10IdentifierE
__ZN3JSC8JSObject12markChildrenERNS_9MarkStackE
__ZN3JSC8JSObject13visitChildrenERNS_9MarkStackE
__ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
__ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateEj
__ZN3JSC8JSObject15unwrappedObjectEv
......@@ -306,7 +306,7 @@ __ZN3JSC8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPNS_16WriteBarrierB
__ZN3JSC8JSObject23allocatePropertyStorageEmm
__ZN3JSC8JSObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
__ZN3JSC8JSObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
__ZN3JSC8JSObject3putEPNS_9ExecStateEjNS_7JSValueE
__ZN3JSC8JSObject3putEPNS_9ExecStateEjNS_7JSValueE
__ZN3JSC8JSObject6s_infoE
__ZN3JSC8Profiler13stopProfilingEPNS_9ExecStateERKNS_7UStringE
__ZN3JSC8Profiler14startProfilingEPNS_9ExecStateERKNS_7UStringE
......
......@@ -237,10 +237,10 @@ EXPORTS
?lockCount@JSLock@JSC@@SAHXZ
?lookupGetter@JSObject@JSC@@UAE?AVJSValue@2@PAVExecState@2@ABVIdentifier@2@@Z
?lookupSetter@JSObject@JSC@@UAE?AVJSValue@2@PAVExecState@2@ABVIdentifier@2@@Z
?markChildren@JSGlobalObject@JSC@@UAEXAAVMarkStack@2@@Z
?markChildren@JSObject@JSC@@UAEXAAVMarkStack@2@@Z
?markChildren@JSWrapperObject@JSC@@EAEXAAVMarkStack@2@@Z
?markChildren@ScopeChainNode@JSC@@UAEXAAVMarkStack@2@@Z
?visitChildren@JSGlobalObject@JSC@@UAEXAAVMarkStack@2@@Z
?visitChildren@JSObject@JSC@@UAEXAAVMarkStack@2@@Z
?visitChildren@JSWrapperObject@JSC@@EAEXAAVMarkStack@2@@Z
?visitChildren@ScopeChainNode@JSC@@UAEXAAVMarkStack@2@@Z
?materializePropertyMap@Structure@JSC@@AAEXAAVJSGlobalData@2@@Z
?monthFromDayInYear@WTF@@YAHH_N@Z
?msToYear@WTF@@YAHN@Z
......
......@@ -1400,37 +1400,37 @@ CodeBlock::~CodeBlock()
#endif
}
void CodeBlock::markStructures(MarkStack& markStack, Instruction* vPC) const
void CodeBlock::visitStructures(SlotVisitor& visitor, Instruction* vPC) const
{
Interpreter* interpreter = m_globalData->interpreter;
if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_self) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_custom_self)) {
markStack.append(&vPC[4].u.structure);
visitor.append(&vPC[4].u.structure);
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_proto) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_custom_proto)) {
markStack.append(&vPC[4].u.structure);
markStack.append(&vPC[5].u.structure);
visitor.append(&vPC[4].u.structure);
visitor.append(&vPC[5].u.structure);
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_chain) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_getter_chain) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_custom_chain)) {
markStack.append(&vPC[4].u.structure);
markStack.append(&vPC[5].u.structureChain);
visitor.append(&vPC[4].u.structure);
visitor.append(&vPC[5].u.structureChain);
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_transition)) {
markStack.append(&vPC[4].u.structure);
markStack.append(&vPC[5].u.structure);
markStack.append(&vPC[6].u.structureChain);
visitor.append(&vPC[4].u.structure);
visitor.append(&vPC[5].u.structure);
visitor.append(&vPC[6].u.structureChain);
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_replace)) {
markStack.append(&vPC[4].u.structure);
visitor.append(&vPC[4].u.structure);
return;
}
if (vPC[0].u.opcode == interpreter->getOpcode(op_resolve_global) || vPC[0].u.opcode == interpreter->getOpcode(op_resolve_global_dynamic)) {
if (vPC[3].u.structure)
markStack.append(&vPC[3].u.structure);
visitor.append(&vPC[3].u.structure);
return;
}
if ((vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto_list))
......@@ -1440,7 +1440,7 @@ void CodeBlock::markStructures(MarkStack& markStack, Instruction* vPC) const
|| (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_custom_proto_list))
|| (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_custom_self_list))) {
PolymorphicAccessStructureList* polymorphicStructures = vPC[4].u.polymorphicStructures;
polymorphicStructures->markAggregate(markStack, vPC[5].u.operand);
polymorphicStructures->visitAggregate(visitor, vPC[5].u.operand);
delete polymorphicStructures;
return;
}
......@@ -1449,48 +1449,48 @@ void CodeBlock::markStructures(MarkStack& markStack, Instruction* vPC) const
ASSERT(vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_generic) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_generic) || vPC[0].u.opcode == interpreter->getOpcode(op_get_array_length) || vPC[0].u.opcode == interpreter->getOpcode(op_get_string_length));
}
void EvalCodeCache::markAggregate(MarkStack& markStack)
void EvalCodeCache::visitAggregate(SlotVisitor& visitor)
{
EvalCacheMap::iterator end = m_cacheMap.end();
for (EvalCacheMap::iterator ptr = m_cacheMap.begin(); ptr != end; ++ptr)
markStack.append(&ptr->second);
visitor.append(&ptr->second);
}
void CodeBlock::markAggregate(MarkStack& markStack)
void CodeBlock::visitAggregate(SlotVisitor& visitor)
{
markStack.append(&m_globalObject);
markStack.append(&m_ownerExecutable);
visitor.append(&m_globalObject);
visitor.append(&m_ownerExecutable);
if (m_rareData)
m_rareData->m_evalCodeCache.markAggregate(markStack);
markStack.appendValues(m_constantRegisters.data(), m_constantRegisters.size());
m_rareData->m_evalCodeCache.visitAggregate(visitor);
visitor.appendValues(m_constantRegisters.data(), m_constantRegisters.size());
for (size_t i = 0; i < m_functionExprs.size(); ++i)
markStack.append(&m_functionExprs[i]);
visitor.append(&m_functionExprs[i]);
for (size_t i = 0; i < m_functionDecls.size(); ++i)
markStack.append(&m_functionDecls[i]);
visitor.append(&m_functionDecls[i]);
#if ENABLE(JIT_OPTIMIZE_CALL)
for (unsigned i = 0; i < numberOfCallLinkInfos(); ++i)
if (callLinkInfo(i).isLinked())
markStack.append(&callLinkInfo(i).callee);
visitor.append(&callLinkInfo(i).callee);
#endif
#if ENABLE(INTERPRETER)
for (size_t size = m_propertyAccessInstructions.size(), i = 0; i < size; ++i)
markStructures(markStack, &m_instructions[m_propertyAccessInstructions[i]]);
markStructures(visitor, &m_instructions[m_propertyAccessInstructions[i]]);
#endif
#if ENABLE(JIT)
for (size_t size = m_globalResolveInfos.size(), i = 0; i < size; ++i) {
if (m_globalResolveInfos[i].structure)
markStack.append(&m_globalResolveInfos[i].structure);
visitor.append(&m_globalResolveInfos[i].structure);
}
for (size_t size = m_structureStubInfos.size(), i = 0; i < size; ++i)
m_structureStubInfos[i].markAggregate(markStack);
m_structureStubInfos[i].visitAggregate(visitor);
for (size_t size = m_methodCallLinkInfos.size(), i = 0; i < size; ++i) {
if (m_methodCallLinkInfos[i].cachedStructure) {
// Both members must be filled at the same time
markStack.append(&m_methodCallLinkInfos[i].cachedStructure);
visitor.append(&m_methodCallLinkInfos[i].cachedStructure);
ASSERT(!!m_methodCallLinkInfos[i].cachedPrototypeStructure);
markStack.append(&m_methodCallLinkInfos[i].cachedPrototypeStructure);
visitor.append(&m_methodCallLinkInfos[i].cachedPrototypeStructure);
}
}
#endif
......
......@@ -211,7 +211,7 @@ namespace JSC {
public:
virtual ~CodeBlock();
void markAggregate(MarkStack&);
void visitAggregate(SlotVisitor&);
static void dumpStatistics();
......@@ -481,7 +481,7 @@ namespace JSC {
void printGetByIdOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op) const;
void printPutByIdOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op) const;
#endif
void markStructures(MarkStack&, Instruction* vPC) const;
void visitStructures(SlotVisitor&, Instruction* vPC) const;
void createRareDataIfNecessary()
{
......
......@@ -42,6 +42,7 @@
namespace JSC {
class MarkStack;
typedef MarkStack SlotVisitor;
class EvalCodeCache {
public:
......@@ -67,7 +68,7 @@ namespace JSC {
bool isEmpty() const { return m_cacheMap.isEmpty(); }
void markAggregate(MarkStack&);
void visitAggregate(SlotVisitor&);
private:
static const unsigned maxCacheableSourceLength = 256;
......
......@@ -107,17 +107,17 @@ namespace JSC {
list[0].set(globalData, owner, stubRoutine, firstBase, firstChain);
}
void markAggregate(MarkStack& markStack, int count)
void visitAggregate(SlotVisitor& visitor, int count)
{
for (int i = 0; i < count; ++i) {
PolymorphicStubInfo& info = list[i];
ASSERT(info.base);
markStack.append(&info.base);
visitor.append(&info.base);
if (info.u.proto && !info.isChain)
markStack.append(&info.u.proto);
visitor.append(&info.u.proto);
if (info.u.chain && info.isChain)
markStack.append(&info.u.chain);
visitor.append(&info.u.chain);
}
}
};
......
......@@ -63,37 +63,37 @@ void StructureStubInfo::deref()
}
}
void StructureStubInfo::markAggregate(MarkStack& markStack)
void StructureStubInfo::visitAggregate(SlotVisitor& visitor)
{
switch (accessType) {
case access_get_by_id_self:
markStack.append(&u.getByIdSelf.baseObjectStructure);
visitor.append(&u.getByIdSelf.baseObjectStructure);
return;
case access_get_by_id_proto:
markStack.append(&u.getByIdProto.baseObjectStructure);
markStack.append(&u.getByIdProto.prototypeStructure);
visitor.append(&u.getByIdProto.baseObjectStructure);
visitor.append(&u.getByIdProto.prototypeStructure);
return;
case access_get_by_id_chain:
markStack.append(&u.getByIdChain.baseObjectStructure);
markStack.append(&u.getByIdChain.chain);
visitor.append(&u.getByIdChain.baseObjectStructure);
visitor.append(&u.getByIdChain.chain);
return;
case access_get_by_id_self_list: {
PolymorphicAccessStructureList* polymorphicStructures = u.getByIdSelfList.structureList;
polymorphicStructures->markAggregate(markStack, u.getByIdSelfList.listSize);
polymorphicStructures->visitAggregate(visitor, u.getByIdSelfList.listSize);
return;
}
case access_get_by_id_proto_list: {
PolymorphicAccessStructureList* polymorphicStructures = u.getByIdProtoList.structureList;
polymorphicStructures->markAggregate(markStack, u.getByIdProtoList.listSize);
polymorphicStructures->visitAggregate(visitor, u.getByIdProtoList.listSize);
return;
}
case access_put_by_id_transition:
markStack.append(&u.putByIdTransition.previousStructure);
markStack.append(&u.putByIdTransition.structure);
markStack.append(&u.putByIdTransition.chain);
visitor.append(&u.putByIdTransition.previousStructure);
visitor.append(&u.putByIdTransition.structure);
visitor.append(&u.putByIdTransition.chain);
return;
case access_put_by_id_replace:
markStack.append(&u.putByIdReplace.baseObjectStructure);
visitor.append(&u.putByIdReplace.baseObjectStructure);
return;
case access_get_by_id:
case access_put_by_id:
......
......@@ -116,7 +116,7 @@ namespace JSC {
}
void deref();
void markAggregate(MarkStack&);
void visitAggregate(SlotVisitor&);
bool seenOnce()
{
......
......@@ -38,12 +38,12 @@ DebuggerActivation::DebuggerActivation(JSGlobalData& globalData, JSObject* activ
m_activation.set(globalData, this, static_cast<JSActivation*>(activation));
}
void DebuggerActivation::markChildren(MarkStack& markStack)
void DebuggerActivation::visitChildren(SlotVisitor& visitor)
{
JSObject::markChildren(markStack);
JSObject::visitChildren(visitor);
if (m_activation)
markStack.append(&m_activation);
visitor.append(&m_activation);
}
UString DebuggerActivation::className() const
......
......@@ -36,7 +36,7 @@ namespace JSC {
public:
DebuggerActivation(JSGlobalData&, JSObject*);
virtual void markChildren(MarkStack&);
virtual void visitChildren(SlotVisitor&);
virtual UString className() const;
virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
......@@ -55,7 +55,7 @@ namespace JSC {
}
protected:
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesMarkChildren | JSObject::StructureFlags;
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesVisitChildren | JSObject::StructureFlags;
private:
WriteBarrier<JSActivation> m_activation;
......
......@@ -34,7 +34,7 @@ WeakHandleOwner::~WeakHandleOwner()
{
}
bool WeakHandleOwner::isReachableFromOpaqueRoots(Handle<Unknown>, void*, MarkStack&)
bool WeakHandleOwner::isReachableFromOpaqueRoots(Handle<Unknown>, void*, SlotVisitor&)
{
return false;
}
......@@ -60,16 +60,16 @@ void HandleHeap::grow()
}
}
void HandleHeap::markStrongHandles(HeapRootMarker& heapRootMarker)
void HandleHeap::markStrongHandles(HeapRootVisitor& heapRootMarker)
{
Node* end = m_strongList.end();
for (Node* node = m_strongList.begin(); node != end; node = node->next())
heapRootMarker.mark(node->slot());
}
void HandleHeap::markWeakHandles(HeapRootMarker& heapRootMarker)
void HandleHeap::markWeakHandles(HeapRootVisitor& heapRootVisitor)
{
MarkStack& markStack = heapRootMarker.markStack();
SlotVisitor& visitor = heapRootVisitor.visitor();
Node* end = m_weakList.end();
for (Node* node = m_weakList.begin(); node != end; node = node->next()) {
......@@ -82,10 +82,10 @@ void HandleHeap::markWeakHandles(HeapRootMarker& heapRootMarker)
if (!weakOwner)
continue;
if (!weakOwner->isReachableFromOpaqueRoots(Handle<Unknown>::wrapSlot(node->slot()), node->weakOwnerContext(), markStack))
if (!weakOwner->isReachableFromOpaqueRoots(Handle<Unknown>::wrapSlot(node->slot()), node->weakOwnerContext(), visitor))
continue;
heapRootMarker.mark(node->slot());
heapRootVisitor.mark(node->slot());
}
}
......