Commit 982c9ea2 authored by mhahnenberg@apple.com's avatar mhahnenberg@apple.com

Add static version of JSCell::visitChildren

https://bugs.webkit.org/show_bug.cgi?id=68404

Reviewed by Darin Adler.

.: 

In this patch we just extract the bodies of the virtual visitChildren methods
throughout the JSCell inheritance hierarchy out into static methods, which are 
now called from the virtual methods.  This is an intermediate step in trying to 
move the virtual-ness of visitChildren into our own custom vtable stored in 
ClassInfo.  We need to convert the methods to static methods in order to be 
able to more easily store and refer to them in our custom vtable since normal 
member methods store some implicit information in their types, making it 
impossible to store them generically in ClassInfo.

* Source/autotools/symbols.filter:

Source/JavaScriptCore: 

In this patch we just extract the bodies of the virtual visitChildren methods
throughout the JSCell inheritance hierarchy out into static methods, which are 
now called from the virtual methods.  This is an intermediate step in trying to 
move the virtual-ness of visitChildren into our own custom vtable stored in 
ClassInfo.  We need to convert the methods to static methods in order to be 
able to more easily store and refer to them in our custom vtable since normal 
member methods store some implicit information in their types, making it 
impossible to store them generically in ClassInfo.

* API/JSCallbackObject.h:
(JSC::JSCallbackObject::visitChildrenVirtual):
(JSC::JSCallbackObject::visitChildren):
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::visitChildrenVirtual):
(JSC::DebuggerActivation::visitChildren):
* debugger/DebuggerActivation.h:
* heap/MarkStack.cpp:
(JSC::SlotVisitor::visitChildren):
(JSC::SlotVisitor::drain):
* runtime/Arguments.cpp:
(JSC::Arguments::visitChildrenVirtual):
(JSC::Arguments::visitChildren):
* runtime/Arguments.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::visitChildrenVirtual):
(JSC::EvalExecutable::visitChildren):
(JSC::ProgramExecutable::visitChildrenVirtual):
(JSC::ProgramExecutable::visitChildren):
(JSC::FunctionExecutable::visitChildrenVirtual):
(JSC::FunctionExecutable::visitChildren):
* runtime/Executable.h:
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::visitChildrenVirtual):
(JSC::GetterSetter::visitChildren):
* runtime/GetterSetter.h:
* runtime/JSActivation.cpp:
(JSC::JSActivation::visitChildrenVirtual):
(JSC::JSActivation::visitChildren):
* runtime/JSActivation.h:
* runtime/JSArray.cpp:
(JSC::JSArray::visitChildrenVirtual):
(JSC::JSArray::visitChildren):
* runtime/JSArray.h:
* runtime/JSBoundFunction.cpp:
(JSC::JSBoundFunction::visitChildrenVirtual):
(JSC::JSBoundFunction::visitChildren):
* runtime/JSBoundFunction.h:
* runtime/JSCell.h:
(JSC::JSCell::visitChildrenVirtual):
(JSC::JSCell::visitChildren):
* runtime/JSFunction.cpp:
(JSC::JSFunction::visitChildrenVirtual):
(JSC::JSFunction::visitChildren):
* runtime/JSFunction.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::visitChildrenVirtual):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
* runtime/JSObject.cpp:
(JSC::JSObject::visitChildrenVirtual):
(JSC::JSObject::visitChildren):
* runtime/JSObject.h:
(JSC::JSObject::visitChildrenDirect):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::visitChildrenVirtual):
(JSC::JSPropertyNameIterator::visitChildren):
* runtime/JSPropertyNameIterator.h:
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::visitChildrenVirtual):
(JSC::JSStaticScopeObject::visitChildren):
* runtime/JSStaticScopeObject.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::visitChildrenVirtual):
(JSC::JSWrapperObject::visitChildren):
* runtime/JSWrapperObject.h:
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::visitChildrenVirtual):
(JSC::NativeErrorConstructor::visitChildren):
* runtime/NativeErrorConstructor.h:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::visitChildrenVirtual):
(JSC::RegExpObject::visitChildren):
* runtime/RegExpObject.h:
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::visitChildrenVirtual):
(JSC::ScopeChainNode::visitChildren):
* runtime/ScopeChain.h:
* runtime/Structure.cpp:
(JSC::Structure::visitChildrenVirtual):
(JSC::Structure::visitChildren):
* runtime/Structure.h:
* runtime/StructureChain.cpp:
(JSC::StructureChain::visitChildrenVirtual):
(JSC::StructureChain::visitChildren):
* runtime/StructureChain.h:

Source/JavaScriptGlue: 

In this patch we just extract the bodies of the virtual visitChildren methods
throughout the JSCell inheritance hierarchy out into static methods, which are 
now called from the virtual methods.  This is an intermediate step in trying to 
move the virtual-ness of visitChildren into our own custom vtable stored in 
ClassInfo.  We need to convert the methods to static methods in order to be 
able to more easily store and refer to them in our custom vtable since normal 
member methods store some implicit information in their types, making it 
impossible to store them generically in ClassInfo.

* UserObjectImp.cpp:
(UserObjectImp::visitChildrenVirtual):
(UserObjectImp::visitChildren):
* UserObjectImp.h:

Source/WebCore: 

No new tests.

In this patch we just extract the bodies of the virtual visitChildren methods
throughout the JSCell inheritance hierarchy out into static methods, which are 
now called from the virtual methods.  This is an intermediate step in trying to 
move the virtual-ness of visitChildren into our own custom vtable stored in 
ClassInfo.  We need to convert the methods to static methods in order to be 
able to more easily store and refer to them in our custom vtable since normal 
member methods store some implicit information in their types, making it 
impossible to store them generically in ClassInfo.

* WebCore.exp.in:
* bindings/js/JSAttrCustom.cpp:
(WebCore::JSAttr::visitChildrenVirtual):
(WebCore::JSAttr::visitChildren):
* bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContext::visitChildrenVirtual):
(WebCore::JSAudioContext::visitChildren):
* bindings/js/JSCSSRuleCustom.cpp:
(WebCore::JSCSSRule::visitChildrenVirtual):
(WebCore::JSCSSRule::visitChildren):
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::visitChildrenVirtual):
(WebCore::JSCSSStyleDeclaration::visitChildren):
* bindings/js/JSCanvasRenderingContextCustom.cpp:
(WebCore::JSCanvasRenderingContext::visitChildrenVirtual):
(WebCore::JSCanvasRenderingContext::visitChildren):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::visitChildrenVirtual):
(WebCore::JSDOMGlobalObject::visitChildren):
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::visitChildrenVirtual):
(WebCore::JSDOMWindow::visitChildren):
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::visitChildrenVirtual):
(WebCore::JSDOMWindowShell::visitChildren):
* bindings/js/JSDOMWindowShell.h:
* bindings/js/JSJavaScriptAudioNodeCustom.cpp:
(WebCore::JSJavaScriptAudioNode::visitChildrenVirtual):
(WebCore::JSJavaScriptAudioNode::visitChildren):
* bindings/js/JSMessageChannelCustom.cpp:
(WebCore::JSMessageChannel::visitChildrenVirtual):
(WebCore::JSMessageChannel::visitChildren):
* bindings/js/JSMessagePortCustom.cpp:
(WebCore::JSMessagePort::visitChildrenVirtual):
(WebCore::JSMessagePort::visitChildren):
* bindings/js/JSNamedNodeMapCustom.cpp:
(WebCore::JSNamedNodeMap::visitChildrenVirtual):
(WebCore::JSNamedNodeMap::visitChildren):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNode::visitChildrenVirtual):
(WebCore::JSNode::visitChildren):
* bindings/js/JSNodeFilterCustom.cpp:
(WebCore::JSNodeFilter::visitChildrenVirtual):
(WebCore::JSNodeFilter::visitChildren):
* bindings/js/JSNodeIteratorCustom.cpp:
(WebCore::JSNodeIterator::visitChildrenVirtual):
(WebCore::JSNodeIterator::visitChildren):
* bindings/js/JSSVGElementInstanceCustom.cpp:
(WebCore::JSSVGElementInstance::visitChildrenVirtual):
(WebCore::JSSVGElementInstance::visitChildren):
* bindings/js/JSSharedWorkerCustom.cpp:
(WebCore::JSSharedWorker::visitChildrenVirtual):
(WebCore::JSSharedWorker::visitChildren):
* bindings/js/JSStyleSheetCustom.cpp:
(WebCore::JSStyleSheet::visitChildrenVirtual):
(WebCore::JSStyleSheet::visitChildren):
* bindings/js/JSTreeWalkerCustom.cpp:
(WebCore::JSTreeWalker::visitChildrenVirtual):
(WebCore::JSTreeWalker::visitChildren):
* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::JSWebGLRenderingContext::visitChildrenVirtual):
(WebCore::JSWebGLRenderingContext::visitChildren):
* bindings/js/JSWorkerContextCustom.cpp:
(WebCore::JSWorkerContext::visitChildrenVirtual):
(WebCore::JSWorkerContext::visitChildren):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::visitChildrenVirtual):
(WebCore::JSXMLHttpRequest::visitChildren):
* bindings/js/JSXPathResultCustom.cpp:
(WebCore::JSXPathResult::visitChildrenVirtual):
(WebCore::JSXPathResult::visitChildren):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::visitChildrenVirtual):
(WebCore::JSTestObj::visitChildren):
* bindings/scripts/test/JS/JSTestObj.h:
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtRuntimeObject::visitChildrenVirtual):
(JSC::Bindings::QtRuntimeObject::visitChildren):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeMetaMethod::visitChildrenVirtual):
(JSC::Bindings::QtRuntimeMetaMethod::visitChildren):
* bridge/qt/qt_runtime.h:
* workers/WorkerContext.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6504077a
2011-09-23 Mark Hahnenberg <mhahnenberg@apple.com>
Add static version of JSCell::visitChildren
https://bugs.webkit.org/show_bug.cgi?id=68404
Reviewed by Darin Adler.
In this patch we just extract the bodies of the virtual visitChildren methods
throughout the JSCell inheritance hierarchy out into static methods, which are
now called from the virtual methods. This is an intermediate step in trying to
move the virtual-ness of visitChildren into our own custom vtable stored in
ClassInfo. We need to convert the methods to static methods in order to be
able to more easily store and refer to them in our custom vtable since normal
member methods store some implicit information in their types, making it
impossible to store them generically in ClassInfo.
* Source/autotools/symbols.filter:
2011-09-21 Julien Chaffraix <jchaffraix@webkit.org>
Crash in RenderBox::paintMaskImages when GraphicsContext's painting is disabled
......
......@@ -196,13 +196,19 @@ private:
virtual ConstructType getConstructData(ConstructData&);
virtual CallType getCallData(CallData&);
virtual void visitChildren(SlotVisitor& visitor)
virtual void visitChildrenVirtual(SlotVisitor& visitor)
{
ASSERT_GC_OBJECT_INHERITS((static_cast<Parent*>(this)), &JSCallbackObject<Parent>::s_info);
visitChildren(this, visitor);
}
static void visitChildren(JSCell* cell, SlotVisitor& visitor)
{
JSCallbackObject* thisObject = static_cast<JSCallbackObject*>(cell);
ASSERT_GC_OBJECT_INHERITS((static_cast<Parent*>(thisObject)), &JSCallbackObject<Parent>::s_info);
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(Parent::structure()->typeInfo().overridesVisitChildren());
Parent::visitChildren(visitor);
m_callbackObjectData->visitChildren(visitor);
ASSERT(thisObject->Parent::structure()->typeInfo().overridesVisitChildren());
Parent::visitChildren(thisObject, visitor);
thisObject->m_callbackObjectData->visitChildren(visitor);
}
void init(ExecState*);
......
2011-09-23 Mark Hahnenberg <mhahnenberg@apple.com>
Add static version of JSCell::visitChildren
https://bugs.webkit.org/show_bug.cgi?id=68404
Reviewed by Darin Adler.
In this patch we just extract the bodies of the virtual visitChildren methods
throughout the JSCell inheritance hierarchy out into static methods, which are
now called from the virtual methods. This is an intermediate step in trying to
move the virtual-ness of visitChildren into our own custom vtable stored in
ClassInfo. We need to convert the methods to static methods in order to be
able to more easily store and refer to them in our custom vtable since normal
member methods store some implicit information in their types, making it
impossible to store them generically in ClassInfo.
* API/JSCallbackObject.h:
(JSC::JSCallbackObject::visitChildrenVirtual):
(JSC::JSCallbackObject::visitChildren):
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::visitChildrenVirtual):
(JSC::DebuggerActivation::visitChildren):
* debugger/DebuggerActivation.h:
* heap/MarkStack.cpp:
(JSC::SlotVisitor::visitChildren):
(JSC::SlotVisitor::drain):
* runtime/Arguments.cpp:
(JSC::Arguments::visitChildrenVirtual):
(JSC::Arguments::visitChildren):
* runtime/Arguments.h:
* runtime/Executable.cpp:
(JSC::EvalExecutable::visitChildrenVirtual):
(JSC::EvalExecutable::visitChildren):
(JSC::ProgramExecutable::visitChildrenVirtual):
(JSC::ProgramExecutable::visitChildren):
(JSC::FunctionExecutable::visitChildrenVirtual):
(JSC::FunctionExecutable::visitChildren):
* runtime/Executable.h:
* runtime/GetterSetter.cpp:
(JSC::GetterSetter::visitChildrenVirtual):
(JSC::GetterSetter::visitChildren):
* runtime/GetterSetter.h:
* runtime/JSActivation.cpp:
(JSC::JSActivation::visitChildrenVirtual):
(JSC::JSActivation::visitChildren):
* runtime/JSActivation.h:
* runtime/JSArray.cpp:
(JSC::JSArray::visitChildrenVirtual):
(JSC::JSArray::visitChildren):
* runtime/JSArray.h:
* runtime/JSBoundFunction.cpp:
(JSC::JSBoundFunction::visitChildrenVirtual):
(JSC::JSBoundFunction::visitChildren):
* runtime/JSBoundFunction.h:
* runtime/JSCell.h:
(JSC::JSCell::visitChildrenVirtual):
(JSC::JSCell::visitChildren):
* runtime/JSFunction.cpp:
(JSC::JSFunction::visitChildrenVirtual):
(JSC::JSFunction::visitChildren):
* runtime/JSFunction.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::visitChildrenVirtual):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
* runtime/JSObject.cpp:
(JSC::JSObject::visitChildrenVirtual):
(JSC::JSObject::visitChildren):
* runtime/JSObject.h:
(JSC::JSObject::visitChildrenDirect):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::visitChildrenVirtual):
(JSC::JSPropertyNameIterator::visitChildren):
* runtime/JSPropertyNameIterator.h:
* runtime/JSStaticScopeObject.cpp:
(JSC::JSStaticScopeObject::visitChildrenVirtual):
(JSC::JSStaticScopeObject::visitChildren):
* runtime/JSStaticScopeObject.h:
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::visitChildrenVirtual):
(JSC::JSWrapperObject::visitChildren):
* runtime/JSWrapperObject.h:
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::visitChildrenVirtual):
(JSC::NativeErrorConstructor::visitChildren):
* runtime/NativeErrorConstructor.h:
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::visitChildrenVirtual):
(JSC::RegExpObject::visitChildren):
* runtime/RegExpObject.h:
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::visitChildrenVirtual):
(JSC::ScopeChainNode::visitChildren):
* runtime/ScopeChain.h:
* runtime/Structure.cpp:
(JSC::Structure::visitChildrenVirtual):
(JSC::Structure::visitChildren):
* runtime/Structure.h:
* runtime/StructureChain.cpp:
(JSC::StructureChain::visitChildrenVirtual):
(JSC::StructureChain::visitChildren):
* runtime/StructureChain.h:
2011-09-23 Oliver Hunt <oliver@apple.com>
Node propagation doesn't handle PutScopedVar
......@@ -162,10 +162,11 @@ __ZN3JSC13StatementNode6setLocEii
__ZN3JSC14JSGlobalObject10globalExecEv
__ZN3JSC14JSGlobalObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectEj
__ZN3JSC14JSGlobalObject12defineSetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectEj
__ZN3JSC14JSGlobalObject13visitChildrenERNS_11SlotVisitorE
__ZN3JSC14JSGlobalObject13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
__ZN3JSC14JSGlobalObject16addStaticGlobalsEPNS0_18GlobalPropertyInfoEi
__ZN3JSC14JSGlobalObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj
__ZN3JSC14JSGlobalObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
__ZN3JSC14JSGlobalObject20visitChildrenVirtualERNS_11SlotVisitorE
__ZN3JSC14JSGlobalObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
__ZN3JSC14JSGlobalObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
__ZN3JSC14JSGlobalObject4initEPNS_8JSObjectE
......@@ -179,7 +180,6 @@ __ZN3JSC14TimeoutChecker10didTimeOutEPNS_9ExecStateE
__ZN3JSC14TimeoutChecker5resetEv
__ZN3JSC14VTableSpectrum5countEPNS_6JSCellE
__ZN3JSC14throwTypeErrorEPNS_9ExecStateE
__ZN3JSC15JSWrapperObject13visitChildrenERNS_11SlotVisitorE
__ZN3JSC15WeakHandleOwner26isReachableFromOpaqueRootsENS_6HandleINS_7UnknownEEEPvRNS_11SlotVisitorE
__ZN3JSC15WeakHandleOwner8finalizeENS_6HandleINS_7UnknownEEEPv
__ZN3JSC15WeakHandleOwnerD2Ev
......@@ -275,11 +275,11 @@ __ZN3JSC6JSLockC1EPNS_9ExecStateE
__ZN3JSC6RegExp5matchERNS_12JSGlobalDataERKNS_7UStringEiPN3WTF6VectorIiLm32EEE
__ZN3JSC6RegExp6createERNS_12JSGlobalDataERKNS_7UStringENS_11RegExpFlagsE
__ZN3JSC6RegExpD1Ev
__ZN3JSC7JSArray13visitChildrenERNS_11SlotVisitorE
__ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataE
__ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataERKNS_7ArgListE
__ZN3JSC7JSArray15setSubclassDataEPv
__ZN3JSC7JSArray18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC7JSArray20visitChildrenVirtualERNS_11SlotVisitorE
__ZN3JSC7JSArray6s_infoE
__ZN3JSC7JSArray9setLengthEj
__ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEPNS_9StructureE
......@@ -308,7 +308,7 @@ __ZN3JSC8JSObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPS0_j
__ZN3JSC8JSObject12defineSetterEPNS_9ExecStateERKNS_10IdentifierEPS0_j
__ZN3JSC8JSObject12lookupGetterEPNS_9ExecStateERKNS_10IdentifierE
__ZN3JSC8JSObject12lookupSetterEPNS_9ExecStateERKNS_10IdentifierE
__ZN3JSC8JSObject13visitChildrenERNS_11SlotVisitorE
__ZN3JSC8JSObject13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE
__ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
__ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateEj
__ZN3JSC8JSObject15unwrappedObjectEv
......@@ -324,6 +324,7 @@ __ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateEjNS_7JSValueEj
__ZN3JSC8JSObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
__ZN3JSC8JSObject18getPrimitiveNumberEPNS_9ExecStateERdRNS_7JSValueE
__ZN3JSC8JSObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
__ZN3JSC8JSObject20visitChildrenVirtualERNS_11SlotVisitorE
__ZN3JSC8JSObject21getPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
__ZN3JSC8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPNS_16WriteBarrierBaseINS_7UnknownEEE
__ZN3JSC8JSObject23allocatePropertyStorageERNS_12JSGlobalDataEmm
......
......@@ -376,11 +376,12 @@ EXPORTS
?unwrappedObject@JSObject@JSC@@UAEPAV12@XZ
?utf8@UString@JSC@@QBE?AVCString@WTF@@_N@Z
?validateValue@MarkStack@JSC@@KAXVJSValue@2@@Z
?visitChildren@JSGlobalObject@JSC@@UAEXAAVSlotVisitor@2@@Z
?visitChildren@JSObject@JSC@@UAEXAAVSlotVisitor@2@@Z
?visitChildren@JSWrapperObject@JSC@@EAEXAAVSlotVisitor@2@@Z
?visitChildren@ScopeChainNode@JSC@@UAEXAAVSlotVisitor@2@@Z
?vtableAnchor@InternalFunction@JSC@@EAEXXZ
?visitChildren@JSGlobalObject@JSC@@SAXPAVJSCell@2@AAVSlotVisitor@2@@Z
?visitChildren@JSObject@JSC@@SAXPAVJSCell@2@AAVSlotVisitor@2@@Z
?visitChildrenVirtual@JSGlobalObject@JSC@@UAEXAAVSlotVisitor@2@@Z
?visitChildrenVirtual@JSObject@JSC@@UAEXAAVSlotVisitor@2@@Z
?visitChildrenVirtual@ScopeChainNode@JSC@@UAEXAAVSlotVisitor@2@@Z
?wait@ThreadCondition@WTF@@QAEXAAVMutex@2@@Z
?waitForThreadCompletion@WTF@@YAHIPAPAX@Z
?writable@PropertyDescriptor@JSC@@QBE_NXZ
......
......@@ -43,15 +43,21 @@ void DebuggerActivation::finishCreation(JSGlobalData& globalData, JSObject* acti
m_activation.set(globalData, this, static_cast<JSActivation*>(activation));
}
void DebuggerActivation::visitChildren(SlotVisitor& visitor)
void DebuggerActivation::visitChildrenVirtual(SlotVisitor& visitor)
{
ASSERT_GC_OBJECT_INHERITS(this, &s_info);
visitChildren(this, visitor);
}
void DebuggerActivation::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
DebuggerActivation* thisObject = static_cast<DebuggerActivation*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(structure()->typeInfo().overridesVisitChildren());
JSObject::visitChildren(visitor);
ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
JSObject::visitChildren(thisObject, visitor);
if (m_activation)
visitor.append(&m_activation);
if (thisObject->m_activation)
visitor.append(&thisObject->m_activation);
}
UString DebuggerActivation::className() const
......
......@@ -41,7 +41,8 @@ namespace JSC {
return activation;
}
virtual void visitChildren(SlotVisitor&);
virtual void visitChildrenVirtual(SlotVisitor&);
static void visitChildren(JSCell*, SlotVisitor&);
virtual UString className() const;
virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
......
......@@ -59,7 +59,7 @@ inline void SlotVisitor::visitChildren(JSCell* cell)
ASSERT(Heap::isMarked(cell));
if (cell->structure()->typeInfo().type() < CompoundType) {
cell->JSCell::visitChildren(*this);
JSCell::visitChildren(cell, *this);
return;
}
......@@ -70,7 +70,7 @@ inline void SlotVisitor::visitChildren(JSCell* cell)
#else
ASSERT(!m_isCheckingForDefaultMarkViolation);
m_isCheckingForDefaultMarkViolation = true;
cell->visitChildren(*this);
cell->visitChildrenVirtual(*this);
ASSERT(m_isCheckingForDefaultMarkViolation);
m_isCheckingForDefaultMarkViolation = false;
#endif
......@@ -80,7 +80,7 @@ inline void SlotVisitor::visitChildren(JSCell* cell)
asArray(cell)->visitChildrenDirect(*this);
return;
}
cell->visitChildren(*this);
cell->visitChildrenVirtual(*this);
}
void SlotVisitor::drain()
......@@ -115,7 +115,7 @@ void SlotVisitor::drain()
#if ENABLE(SIMPLE_HEAP_PROFILING)
m_visitedTypeCounts.count(cell);
#endif
cell->JSCell::visitChildren(*this);
JSCell::visitChildren(cell, *this);
if (current.m_values == end) {
m_markSets.removeLast();
continue;
......
......@@ -43,25 +43,31 @@ Arguments::~Arguments()
delete [] d->extraArguments;
}
void Arguments::visitChildren(SlotVisitor& visitor)
void Arguments::visitChildrenVirtual(SlotVisitor& visitor)
{
ASSERT_GC_OBJECT_INHERITS(this, &s_info);
visitChildren(this, visitor);
}
void Arguments::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
Arguments* thisObject = static_cast<Arguments*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(structure()->typeInfo().overridesVisitChildren());
JSObject::visitChildren(visitor);
ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
JSObject::visitChildren(thisObject, visitor);
if (d->registerArray)
visitor.appendValues(d->registerArray.get(), d->numParameters);
if (thisObject->d->registerArray)
visitor.appendValues(thisObject->d->registerArray.get(), thisObject->d->numParameters);
if (d->extraArguments) {
unsigned numExtraArguments = d->numArguments - d->numParameters;
visitor.appendValues(d->extraArguments, numExtraArguments);
if (thisObject->d->extraArguments) {
unsigned numExtraArguments = thisObject->d->numArguments - thisObject->d->numParameters;
visitor.appendValues(thisObject->d->extraArguments, numExtraArguments);
}
visitor.append(&d->callee);
visitor.append(&thisObject->d->callee);
if (d->activation)
visitor.append(&d->activation);
if (thisObject->d->activation)
visitor.append(&thisObject->d->activation);
}
void Arguments::copyToRegisters(ExecState* exec, Register* buffer, uint32_t maxSize)
......
......@@ -90,7 +90,8 @@ namespace JSC {
static const ClassInfo s_info;
virtual void visitChildren(SlotVisitor&);
virtual void visitChildrenVirtual(SlotVisitor&);
static void visitChildren(JSCell*, SlotVisitor&);
void fillArgList(ExecState*, MarkedArgumentBuffer&);
......
......@@ -234,14 +234,20 @@ void EvalExecutable::jettisonOptimizedCode(JSGlobalData& globalData)
}
#endif
void EvalExecutable::visitChildren(SlotVisitor& visitor)
void EvalExecutable::visitChildrenVirtual(SlotVisitor& visitor)
{
ASSERT_GC_OBJECT_INHERITS(this, &s_info);
visitChildren(this, visitor);
}
void EvalExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
EvalExecutable* thisObject = static_cast<EvalExecutable*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(structure()->typeInfo().overridesVisitChildren());
ScriptExecutable::visitChildren(visitor);
if (m_evalCodeBlock)
m_evalCodeBlock->visitAggregate(visitor);
ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
ScriptExecutable::visitChildren(thisObject, visitor);
if (thisObject->m_evalCodeBlock)
thisObject->m_evalCodeBlock->visitAggregate(visitor);
}
void EvalExecutable::unlinkCalls()
......@@ -372,14 +378,20 @@ void ProgramExecutable::unlinkCalls()
#endif
}
void ProgramExecutable::visitChildren(SlotVisitor& visitor)
void ProgramExecutable::visitChildrenVirtual(SlotVisitor& visitor)
{
ASSERT_GC_OBJECT_INHERITS(this, &s_info);
visitChildren(this, visitor);
}
void ProgramExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
ProgramExecutable* thisObject = static_cast<ProgramExecutable*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(structure()->typeInfo().overridesVisitChildren());
ScriptExecutable::visitChildren(visitor);
if (m_programCodeBlock)
m_programCodeBlock->visitAggregate(visitor);
ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
ScriptExecutable::visitChildren(thisObject, visitor);
if (thisObject->m_programCodeBlock)
thisObject->m_programCodeBlock->visitAggregate(visitor);
}
void ProgramExecutable::clearCode()
......@@ -584,18 +596,24 @@ void FunctionExecutable::jettisonOptimizedCodeForConstruct(JSGlobalData& globalD
}
#endif
void FunctionExecutable::visitChildren(SlotVisitor& visitor)
void FunctionExecutable::visitChildrenVirtual(SlotVisitor& visitor)
{
visitChildren(this, visitor);
}
void FunctionExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
ASSERT_GC_OBJECT_INHERITS(this, &s_info);
FunctionExecutable* thisObject = static_cast<FunctionExecutable*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(structure()->typeInfo().overridesVisitChildren());
ScriptExecutable::visitChildren(visitor);
if (m_nameValue)
visitor.append(&m_nameValue);
if (m_codeBlockForCall)
m_codeBlockForCall->visitAggregate(visitor);
if (m_codeBlockForConstruct)
m_codeBlockForConstruct->visitAggregate(visitor);
ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
ScriptExecutable::visitChildren(thisObject, visitor);
if (thisObject->m_nameValue)
visitor.append(&thisObject->m_nameValue);
if (thisObject->m_codeBlockForCall)
thisObject->m_codeBlockForCall->visitAggregate(visitor);
if (thisObject->m_codeBlockForConstruct)
thisObject->m_codeBlockForConstruct->visitAggregate(visitor);
}
void FunctionExecutable::discardCode()
......
......@@ -356,7 +356,8 @@ namespace JSC {
EvalExecutable(ExecState*, const SourceCode&, bool);
JSObject* compileInternal(ExecState*, ScopeChainNode*, JITCode::JITType);
virtual void visitChildren(SlotVisitor&);
virtual void visitChildrenVirtual(SlotVisitor&);
static void visitChildren(JSCell*, SlotVisitor&);
void unlinkCalls();
OwnPtr<EvalCodeBlock> m_evalCodeBlock;
......@@ -421,7 +422,8 @@ namespace JSC {
ProgramExecutable(ExecState*, const SourceCode&);
JSObject* compileInternal(ExecState*, ScopeChainNode*, JITCode::JITType);
virtual void visitChildren(SlotVisitor&);
virtual void visitChildrenVirtual(SlotVisitor&);
static void visitChildren(JSCell*, SlotVisitor&);
void unlinkCalls();
OwnPtr<ProgramCodeBlock> m_programCodeBlock;
......@@ -580,7 +582,8 @@ namespace JSC {
SharedSymbolTable* symbolTable() const { return m_symbolTable; }
void discardCode();
void visitChildren(SlotVisitor&);
void visitChildrenVirtual(SlotVisitor&);
static void visitChildren(JSCell*, SlotVisitor&);
static FunctionExecutable* fromGlobalCode(const Identifier&, ExecState*, Debugger*, const SourceCode&, JSObject** exception);
static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto)
{
......
......@@ -30,16 +30,22 @@ namespace JSC {
const ClassInfo GetterSetter::s_info = { "GetterSetter", 0, 0, 0 };
void GetterSetter::visitChildren(SlotVisitor& visitor)
void GetterSetter::visitChildrenVirtual(SlotVisitor& visitor)
{
ASSERT_GC_OBJECT_INHERITS(this, &s_info);
ASSERT(structure()->typeInfo().overridesVisitChildren());
JSCell::visitChildren(visitor);
if (m_getter)
visitor.append(&m_getter);
if (m_setter)
visitor.append(&m_setter);
visitChildren(this, visitor);
}
void GetterSetter::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
GetterSetter* thisObject = static_cast<GetterSetter*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
JSCell::visitChildren(thisObject, visitor);
if (thisObject->m_getter)
visitor.append(&thisObject->m_getter);
if (thisObject->m_setter)
visitor.append(&thisObject->m_setter);
}
} // namespace JSC
......@@ -53,7 +53,8 @@ namespace JSC {
return getterSetter;
}
virtual void visitChildren(SlotVisitor&);
virtual void visitChildrenVirtual(SlotVisitor&);
static void visitChildren(JSCell*, SlotVisitor&);
JSObject* getter() const { return m_getter.get(); }
void setGetter(JSGlobalData& globalData, JSObject* getter) { m_getter.set(globalData, this, getter); }
......
......@@ -63,22 +63,28 @@ JSActivation::~JSActivation()
static_cast<SharedSymbolTable*>(m_symbolTable)->deref();
}
void JSActivation::visitChildren(SlotVisitor& visitor)
void JSActivation::visitChildrenVirtual(SlotVisitor& visitor)
{
ASSERT_GC_OBJECT_INHERITS(this, &s_info);
visitChildren(this, visitor);
}
void JSActivation::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
JSActivation* thisObject = static_cast<JSActivation*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(structure()->typeInfo().overridesVisitChildren());
Base::visitChildren(visitor);
ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
Base::visitChildren(thisObject, visitor);
// No need to mark our registers if they're still in the RegisterFile.
WriteBarrier<Unknown>* registerArray = m_registerArray.get();
WriteBarrier<Unknown>* registerArray = thisObject->m_registerArray.get();
if (!registerArray)
return;
visitor.appendValues(registerArray, m_numParametersMinusThis);
visitor.appendValues(registerArray, thisObject->m_numParametersMinusThis);
// Skip the call frame, which sits between the parameters and vars.
visitor.appendValues(registerArray + m_numParametersMinusThis + RegisterFile::CallFrameHeaderSize, m_numCapturedVars);
visitor.appendValues(registerArray + thisObject->m_numParametersMinusThis + RegisterFile::CallFrameHeaderSize, thisObject->m_numCapturedVars);
}
inline bool JSActivation::symbolTableGet(const Identifier& propertyName, PropertySlot& slot)
......
......@@ -55,7 +55,8 @@ namespace JSC {
virtual ~JSActivation();
virtual void visitChildren(SlotVisitor&);
virtual void visitChildrenVirtual(SlotVisitor&);
static void visitChildren(JSCell*, SlotVisitor&);
virtual bool isDynamicScope(bool& requiresDynamicChecks) const;
......
......@@ -871,12 +871,18 @@ void JSArray::unshiftCount(ExecState* exec, int count)
vector[i].clear();
}
void JSArray::visitChildren(SlotVisitor& visitor)
void JSArray::visitChildrenVirtual(SlotVisitor& visitor)
{
ASSERT_GC_OBJECT_INHERITS(this, &s_info);
visitChildren(this, visitor);
}
void JSArray::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
JSArray* thisObject = static_cast<JSArray*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(structure()->typeInfo().overridesVisitChildren());
visitChildrenDirect(visitor);
ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
thisObject->visitChildrenDirect(visitor);
}
static int compareNumbersForQSort(const void* a, const void* b)
......
......@@ -172,7 +172,8 @@ namespace JSC {
virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
virtual bool deleteProperty(ExecState*, unsigned propertyName);
virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
virtual void visitChildren(SlotVisitor&);
virtual void visitChildrenVirtual(SlotVisitor&);
static void visitChildren(JSCell*, SlotVisitor&);
void* subclassData() const;
void setSubclassData(void*);
......
......@@ -140,16 +140,22 @@ void JSBoundFunction::finishCreation(ExecState* exec, NativeExecutable* executab
ASSERT(inherits(&s_info));
}
void JSBoundFunction::visitChildren(SlotVisitor& visitor)
void JSBoundFunction::visitChildrenVirtual(SlotVisitor& visitor)
{
ASSERT_GC_OBJECT_INHERITS(this, &s_info);
visitChildren(this, visitor);
}
void JSBoundFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
JSBoundFunction* thisObject = static_cast<JSBoundFunction*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
ASSERT(structure()->typeInfo().overridesVisitChildren());
Base::visitChildren(visitor);
ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
Base::visitChildren(thisObject, visitor);
visitor.append(&m_targetFunction);
visitor.append(&m_boundThis);
visitor.append(&m_boundArgs);
visitor.append(&thisObject->m_targetFunction);
visitor.append(&thisObject->m_boundThis);
visitor.append(&thisObject