De-virtualize JSCell::visitChildrenVirtual and remove all other visitChildrenVirtual...
authormhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2011 19:37:09 +0000 (19:37 +0000)
committermhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Sep 2011 19:37:09 +0000 (19:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68839

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Removed the remaining visitChildrenVirtual methods.  This patch completes the process of
de-virtualizing visitChildren.

* API/JSCallbackObject.h:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* debugger/DebuggerActivation.cpp:
* debugger/DebuggerActivation.h:
* runtime/Arguments.cpp:
* runtime/Arguments.h:
* runtime/Executable.cpp:
* runtime/Executable.h:
* runtime/GetterSetter.cpp:
* runtime/GetterSetter.h:
* runtime/JSActivation.cpp:
* runtime/JSActivation.h:
* runtime/JSArray.cpp:
* runtime/JSArray.h:
* runtime/JSFunction.cpp:
* runtime/JSFunction.h:
* runtime/JSGlobalObject.cpp:
* runtime/JSGlobalObject.h:
* runtime/JSObject.cpp:
* runtime/JSPropertyNameIterator.cpp:
* runtime/JSPropertyNameIterator.h:
* runtime/JSStaticScopeObject.cpp:
* runtime/JSStaticScopeObject.h:
* runtime/JSValue.h:
* runtime/NativeErrorConstructor.cpp:
* runtime/NativeErrorConstructor.h:
* runtime/RegExpObject.cpp:
* runtime/RegExpObject.h:
* runtime/Structure.cpp:
* runtime/Structure.h:
* runtime/StructureChain.cpp:
* runtime/StructureChain.h:

Inlined the method table access and call to the visitChildren function (the only call sites
to visitChildren are here).
* heap/MarkStack.cpp:
(JSC::SlotVisitor::visitChildren):

Changed the field name for the visitChildren function pointer to visitChildren (from
visitChildrenFunctionPtr) to make call sites less verbose.
* runtime/ClassInfo.h:

Discovered JSBoundFunction doesn't have its own ClassInfo (it used JSFunction's ClassInfo) but
overrides visitChildren, so it needs to have its own ClassInfo.
* runtime/JSBoundFunction.cpp:
* runtime/JSBoundFunction.h:

Had to move className up to make sure that the virtual destructor in JSObject wasn't
the first non-inline virtual method in JSObject (as per the comment in the file).
Also moved JSCell::visitChildrenVirtual into JSObject.h in order for it be inline-able
to mitigate the cost of an extra method call.

Also added a convenience accessor function methodTable() to JSCell to return the MethodTable to make
call sites more concise.  Implementation is inline in JSObject.h.
* runtime/JSObject.h:
(JSC::JSCell::methodTable):
* runtime/JSCell.h:

Added an out of line virtual destructor to JSWrapperObject and ScopeChainNode to
appease the vtable gods.  It refused to compile if there were no virtual methods in
both of these classes due to the presence of a weak vtable pointer.
* runtime/JSWrapperObject.cpp:
(JSC::JSWrapperObject::~JSWrapperObject):
* runtime/JSWrapperObject.h:
* runtime/ScopeChain.cpp:
(JSC::ScopeChainNode::~ScopeChainNode):
* runtime/ScopeChain.h:

Source/JavaScriptGlue:

Removed the remaining visitChildrenVirtual methods.  This patch completes the process of
de-virtualizing visitChildren.

* UserObjectImp.cpp:
* UserObjectImp.h:

Source/WebCore:

No new tests.

Removed the remaining visitChildrenVirtual methods.  This patch completes the process of
de-virtualizing visitChildren.

* WebCore.exp.in:
* bindings/js/JSAttrCustom.cpp:
* bindings/js/JSAudioContextCustom.cpp:
* bindings/js/JSCSSRuleCustom.cpp:
* bindings/js/JSCSSStyleDeclarationCustom.cpp:
* bindings/js/JSCanvasRenderingContextCustom.cpp:
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
(WebCore::JSDOMGlobalObject::finishCreation):
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSDOMWindowCustom.cpp:
* bindings/js/JSDOMWindowShell.cpp:
* bindings/js/JSDOMWindowShell.h:
* bindings/js/JSJavaScriptAudioNodeCustom.cpp:
* bindings/js/JSMessageChannelCustom.cpp:
* bindings/js/JSMessagePortCustom.cpp:
* bindings/js/JSNamedNodeMapCustom.cpp:
* bindings/js/JSNodeCustom.cpp:
* bindings/js/JSNodeFilterCustom.cpp:
* bindings/js/JSNodeIteratorCustom.cpp:
* bindings/js/JSSVGElementInstanceCustom.cpp:
* bindings/js/JSSharedWorkerCustom.cpp:
* bindings/js/JSStyleSheetCustom.cpp:
* bindings/js/JSTreeWalkerCustom.cpp:
* bindings/js/JSWebGLRenderingContextCustom.cpp:
* bindings/js/JSWorkerContextCustom.cpp:
* bindings/js/JSXMLHttpRequestCustom.cpp:
* bindings/js/JSXPathResultCustom.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bridge/qt/qt_instance.cpp:
* bridge/qt/qt_runtime.cpp:
* bridge/qt/qt_runtime.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@96346 268f45cc-cd09-0410-ab3c-d52691b4dbfc

78 files changed:
Source/JavaScriptCore/API/JSCallbackObject.h
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.exp
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
Source/JavaScriptCore/debugger/DebuggerActivation.cpp
Source/JavaScriptCore/debugger/DebuggerActivation.h
Source/JavaScriptCore/heap/MarkStack.cpp
Source/JavaScriptCore/runtime/Arguments.cpp
Source/JavaScriptCore/runtime/Arguments.h
Source/JavaScriptCore/runtime/ClassInfo.h
Source/JavaScriptCore/runtime/Executable.cpp
Source/JavaScriptCore/runtime/Executable.h
Source/JavaScriptCore/runtime/GetterSetter.cpp
Source/JavaScriptCore/runtime/GetterSetter.h
Source/JavaScriptCore/runtime/JSActivation.cpp
Source/JavaScriptCore/runtime/JSActivation.h
Source/JavaScriptCore/runtime/JSArray.cpp
Source/JavaScriptCore/runtime/JSArray.h
Source/JavaScriptCore/runtime/JSBoundFunction.cpp
Source/JavaScriptCore/runtime/JSBoundFunction.h
Source/JavaScriptCore/runtime/JSCell.h
Source/JavaScriptCore/runtime/JSFunction.cpp
Source/JavaScriptCore/runtime/JSFunction.h
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.h
Source/JavaScriptCore/runtime/JSObject.cpp
Source/JavaScriptCore/runtime/JSObject.h
Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp
Source/JavaScriptCore/runtime/JSPropertyNameIterator.h
Source/JavaScriptCore/runtime/JSStaticScopeObject.cpp
Source/JavaScriptCore/runtime/JSStaticScopeObject.h
Source/JavaScriptCore/runtime/JSValue.h
Source/JavaScriptCore/runtime/JSWrapperObject.cpp
Source/JavaScriptCore/runtime/JSWrapperObject.h
Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp
Source/JavaScriptCore/runtime/NativeErrorConstructor.h
Source/JavaScriptCore/runtime/RegExpObject.cpp
Source/JavaScriptCore/runtime/RegExpObject.h
Source/JavaScriptCore/runtime/ScopeChain.cpp
Source/JavaScriptCore/runtime/ScopeChain.h
Source/JavaScriptCore/runtime/Structure.cpp
Source/JavaScriptCore/runtime/Structure.h
Source/JavaScriptCore/runtime/StructureChain.cpp
Source/JavaScriptCore/runtime/StructureChain.h
Source/JavaScriptGlue/ChangeLog
Source/JavaScriptGlue/UserObjectImp.cpp
Source/JavaScriptGlue/UserObjectImp.h
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/bindings/js/JSAttrCustom.cpp
Source/WebCore/bindings/js/JSAudioContextCustom.cpp
Source/WebCore/bindings/js/JSCSSRuleCustom.cpp
Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp
Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp
Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
Source/WebCore/bindings/js/JSDOMGlobalObject.h
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/js/JSDOMWindowShell.cpp
Source/WebCore/bindings/js/JSDOMWindowShell.h
Source/WebCore/bindings/js/JSJavaScriptAudioNodeCustom.cpp
Source/WebCore/bindings/js/JSMessageChannelCustom.cpp
Source/WebCore/bindings/js/JSMessagePortCustom.cpp
Source/WebCore/bindings/js/JSNamedNodeMapCustom.cpp
Source/WebCore/bindings/js/JSNodeCustom.cpp
Source/WebCore/bindings/js/JSNodeFilterCustom.cpp
Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp
Source/WebCore/bindings/js/JSSVGElementInstanceCustom.cpp
Source/WebCore/bindings/js/JSSharedWorkerCustom.cpp
Source/WebCore/bindings/js/JSStyleSheetCustom.cpp
Source/WebCore/bindings/js/JSTreeWalkerCustom.cpp
Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
Source/WebCore/bindings/js/JSWorkerContextCustom.cpp
Source/WebCore/bindings/js/JSXMLHttpRequestCustom.cpp
Source/WebCore/bindings/js/JSXPathResultCustom.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bridge/qt/qt_instance.cpp
Source/WebCore/bridge/qt/qt_runtime.cpp
Source/WebCore/bridge/qt/qt_runtime.h

index 7cd483c..feb7d97 100644 (file)
@@ -197,11 +197,6 @@ private:
     virtual CallType getCallDataVirtual(CallData&);
     static CallType getCallData(JSCell*, CallData&);
 
-    virtual void visitChildrenVirtual(SlotVisitor& visitor)
-    {
-        visitChildren(this, visitor);
-    }
-
     static void visitChildren(JSCell* cell, SlotVisitor& visitor)
     {
         JSCallbackObject* thisObject = static_cast<JSCallbackObject*>(cell);
index 3867e72..384ae0f 100644 (file)
@@ -1,3 +1,82 @@
+2011-09-29  Mark Hahnenberg  <mhahnenberg@apple.com>
+
+        De-virtualize JSCell::visitChildrenVirtual and remove all other visitChildrenVirtual methods
+        https://bugs.webkit.org/show_bug.cgi?id=68839
+
+        Reviewed by Geoffrey Garen.
+
+        Removed the remaining visitChildrenVirtual methods.  This patch completes the process of 
+        de-virtualizing visitChildren.
+
+        * API/JSCallbackObject.h:
+        * JavaScriptCore.exp:
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+        * debugger/DebuggerActivation.cpp:
+        * debugger/DebuggerActivation.h:
+        * runtime/Arguments.cpp:
+        * runtime/Arguments.h:
+        * runtime/Executable.cpp:
+        * runtime/Executable.h:
+        * runtime/GetterSetter.cpp:
+        * runtime/GetterSetter.h:
+        * runtime/JSActivation.cpp:
+        * runtime/JSActivation.h:
+        * runtime/JSArray.cpp:
+        * runtime/JSArray.h:
+        * runtime/JSFunction.cpp:
+        * runtime/JSFunction.h:
+        * runtime/JSGlobalObject.cpp:
+        * runtime/JSGlobalObject.h:
+        * runtime/JSObject.cpp:
+        * runtime/JSPropertyNameIterator.cpp:
+        * runtime/JSPropertyNameIterator.h:
+        * runtime/JSStaticScopeObject.cpp:
+        * runtime/JSStaticScopeObject.h:
+        * runtime/JSValue.h:
+        * runtime/NativeErrorConstructor.cpp:
+        * runtime/NativeErrorConstructor.h:
+        * runtime/RegExpObject.cpp:
+        * runtime/RegExpObject.h:
+        * runtime/Structure.cpp:
+        * runtime/Structure.h:
+        * runtime/StructureChain.cpp:
+        * runtime/StructureChain.h:
+
+        Inlined the method table access and call to the visitChildren function (the only call sites 
+        to visitChildren are here).
+        * heap/MarkStack.cpp:
+        (JSC::SlotVisitor::visitChildren):
+
+        Changed the field name for the visitChildren function pointer to visitChildren (from 
+        visitChildrenFunctionPtr) to make call sites less verbose.
+        * runtime/ClassInfo.h:
+
+        Discovered JSBoundFunction doesn't have its own ClassInfo (it used JSFunction's ClassInfo) but 
+        overrides visitChildren, so it needs to have its own ClassInfo.
+        * runtime/JSBoundFunction.cpp:
+        * runtime/JSBoundFunction.h:
+
+        Had to move className up to make sure that the virtual destructor in JSObject wasn't 
+        the first non-inline virtual method in JSObject (as per the comment in the file).
+        Also moved JSCell::visitChildrenVirtual into JSObject.h in order for it be inline-able
+        to mitigate the cost of an extra method call.
+
+        Also added a convenience accessor function methodTable() to JSCell to return the MethodTable to make 
+        call sites more concise.  Implementation is inline in JSObject.h.
+        * runtime/JSObject.h:
+        (JSC::JSCell::methodTable):
+        * runtime/JSCell.h:
+
+        Added an out of line virtual destructor to JSWrapperObject and ScopeChainNode to 
+        appease the vtable gods.  It refused to compile if there were no virtual methods in 
+        both of these classes due to the presence of a weak vtable pointer.
+        * runtime/JSWrapperObject.cpp:
+        (JSC::JSWrapperObject::~JSWrapperObject):
+        * runtime/JSWrapperObject.h:
+        * runtime/ScopeChain.cpp:
+        (JSC::ScopeChainNode::~ScopeChainNode):
+        * runtime/ScopeChain.h:
+
 2011-09-29  Yuqiang Xian  <yuqiang.xian@intel.com>
 
         Bug fixes for CreateThis, NewObject and GetByOffset in JSVALUE32_64 DFG JIT
index ec291c5..f822988 100644 (file)
@@ -166,7 +166,6 @@ __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
@@ -277,7 +276,6 @@ __ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataE
 __ZN3JSC7JSArray14finishCreationERNS_12JSGlobalDataERKNS_7ArgListE
 __ZN3JSC7JSArray15setSubclassDataEPv
 __ZN3JSC7JSArray18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
-__ZN3JSC7JSArray20visitChildrenVirtualERNS_11SlotVisitorE
 __ZN3JSC7JSArray6s_infoE
 __ZN3JSC7JSArray9setLengthEj
 __ZN3JSC7JSArrayC1ERNS_12JSGlobalDataEPNS_9StructureE
@@ -321,7 +319,6 @@ __ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValu
 __ZN3JSC8JSObject17putWithAttributesEPNS_9ExecStateEjNS_7JSValueEj
 __ZN3JSC8JSObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
 __ZN3JSC8JSObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
-__ZN3JSC8JSObject20visitChildrenVirtualERNS_11SlotVisitorE
 __ZN3JSC8JSObject21getPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
 __ZN3JSC8JSObject22fillGetterPropertySlotERNS_12PropertySlotEPNS_16WriteBarrierBaseINS_7UnknownEEE
 __ZN3JSC8JSObject23allocatePropertyStorageERNS_12JSGlobalDataEmm
index a3355c3..867259b 100644 (file)
@@ -33,6 +33,7 @@ EXPORTS
     ??1JSGlobalObject@JSC@@UAE@XZ
     ??1Mutex@WTF@@QAE@XZ
     ??1RefCountedLeakCounter@WTF@@QAE@XZ
+    ??1ScopeChainNode@JSC@@EAE@XZ
     ??1SourceProviderCache@JSC@@QAE@XZ
     ??1ThreadCondition@WTF@@QAE@XZ
     ??1WTFThreadData@WTF@@QAE@XZ
@@ -372,9 +373,6 @@ EXPORTS
     ?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
index ef97b0f..d7b866d 100644 (file)
@@ -43,11 +43,6 @@ void DebuggerActivation::finishCreation(JSGlobalData& globalData, JSObject* acti
     m_activation.set(globalData, this, static_cast<JSActivation*>(activation));
 }
 
-void DebuggerActivation::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void DebuggerActivation::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     DebuggerActivation* thisObject = static_cast<DebuggerActivation*>(cell);
index b0c20c2..97110b2 100644 (file)
@@ -41,7 +41,6 @@ namespace JSC {
             return activation;
         }
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
         virtual UString className() const;
         virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
index c39c57f..e539c41 100644 (file)
@@ -70,7 +70,7 @@ inline void SlotVisitor::visitChildren(JSCell* cell)
 #else
         ASSERT(!m_isCheckingForDefaultMarkViolation);
         m_isCheckingForDefaultMarkViolation = true;
-        cell->visitChildrenVirtual(*this);
+        cell->methodTable()->visitChildren(cell, *this);
         ASSERT(m_isCheckingForDefaultMarkViolation);
         m_isCheckingForDefaultMarkViolation = false;
 #endif
@@ -80,7 +80,7 @@ inline void SlotVisitor::visitChildren(JSCell* cell)
         asArray(cell)->visitChildrenDirect(*this);
         return;
     }
-    cell->visitChildrenVirtual(*this);
+    cell->methodTable()->visitChildren(cell, *this);
 }
 
 void SlotVisitor::drain()
index 62f485d..f53b9bd 100644 (file)
@@ -43,11 +43,6 @@ Arguments::~Arguments()
         delete [] d->extraArguments;
 }
 
-void Arguments::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void Arguments::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     Arguments* thisObject = static_cast<Arguments*>(cell);
index 5e23074..fe990b4 100644 (file)
@@ -90,7 +90,6 @@ namespace JSC {
 
         static const ClassInfo s_info;
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         void fillArgList(ExecState*, MarkedArgumentBuffer&);
index 007aa5c..913ebb7 100644 (file)
@@ -32,7 +32,7 @@ namespace JSC {
 
     struct MethodTable {
         typedef void (*VisitChildrenFunctionPtr)(JSCell*, SlotVisitor&);
-        VisitChildrenFunctionPtr visitChildrenFunctionPtr;
+        VisitChildrenFunctionPtr visitChildren;
     };
 
 #define CREATE_METHOD_TABLE(ClassName) { \
index 781b934..3bbae1b 100644 (file)
@@ -234,11 +234,6 @@ void EvalExecutable::jettisonOptimizedCode(JSGlobalData& globalData)
 }
 #endif
 
-void EvalExecutable::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void EvalExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     EvalExecutable* thisObject = static_cast<EvalExecutable*>(cell);
@@ -378,11 +373,6 @@ void ProgramExecutable::unlinkCalls()
 #endif
 }
 
-void ProgramExecutable::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void ProgramExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     ProgramExecutable* thisObject = static_cast<ProgramExecutable*>(cell);
@@ -596,11 +586,6 @@ void FunctionExecutable::jettisonOptimizedCodeForConstruct(JSGlobalData& globalD
 }
 #endif
 
-void FunctionExecutable::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void FunctionExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     FunctionExecutable* thisObject = static_cast<FunctionExecutable*>(cell);
index 15308bf..2457729 100644 (file)
@@ -356,7 +356,6 @@ namespace JSC {
         EvalExecutable(ExecState*, const SourceCode&, bool);
 
         JSObject* compileInternal(ExecState*, ScopeChainNode*, JITCode::JITType);
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
         void unlinkCalls();
 
@@ -422,7 +421,6 @@ namespace JSC {
         ProgramExecutable(ExecState*, const SourceCode&);
 
         JSObject* compileInternal(ExecState*, ScopeChainNode*, JITCode::JITType);
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
         void unlinkCalls();
 
@@ -582,7 +580,6 @@ namespace JSC {
         SharedSymbolTable* symbolTable() const { return m_symbolTable; }
 
         void discardCode();
-        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)
index d0a578a..bef987f 100644 (file)
@@ -30,11 +30,6 @@ namespace JSC {
 
 const ClassInfo GetterSetter::s_info = { "GetterSetter", 0, 0, 0, CREATE_METHOD_TABLE(GetterSetter) };
 
-void GetterSetter::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void GetterSetter::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     GetterSetter* thisObject = static_cast<GetterSetter*>(cell);
index a312f73..d5aab81 100644 (file)
@@ -53,7 +53,6 @@ namespace JSC {
             return getterSetter;
         }
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         JSObject* getter() const { return m_getter.get(); }
index 959bcf8..442b77f 100644 (file)
@@ -63,11 +63,6 @@ JSActivation::~JSActivation()
     static_cast<SharedSymbolTable*>(m_symbolTable)->deref();
 }
 
-void JSActivation::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSActivation::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSActivation* thisObject = static_cast<JSActivation*>(cell);
index 9910976..e6e774f 100644 (file)
@@ -55,7 +55,6 @@ namespace JSC {
 
         virtual ~JSActivation();
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         virtual bool isDynamicScope(bool& requiresDynamicChecks) const;
index 1d0a156..020ccf0 100644 (file)
@@ -871,11 +871,6 @@ void JSArray::unshiftCount(ExecState* exec, int count)
         vector[i].clear();
 }
 
-void JSArray::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSArray::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSArray* thisObject = static_cast<JSArray*>(cell);
index e8fe789..e5532ab 100644 (file)
@@ -172,7 +172,6 @@ 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 visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         void* subclassData() const;
index bbc9bd9..fd31bcd 100644 (file)
@@ -32,6 +32,8 @@ namespace JSC {
 
 ASSERT_CLASS_FITS_IN_CELL(JSBoundFunction);
 
+const ClassInfo JSBoundFunction::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(JSBoundFunction) };
+
 EncodedJSValue JSC_HOST_CALL boundFunctionCall(ExecState* exec)
 {
     JSBoundFunction* boundFunction = static_cast<JSBoundFunction*>(exec->callee());
@@ -140,11 +142,6 @@ void JSBoundFunction::finishCreation(ExecState* exec, NativeExecutable* executab
     ASSERT(inherits(&s_info));
 }
 
-void JSBoundFunction::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSBoundFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSBoundFunction* thisObject = static_cast<JSBoundFunction*>(cell);
index 5250e90..ebbc46c 100644 (file)
@@ -54,10 +54,11 @@ public:
         return Structure::create(globalData, globalObject, prototype, TypeInfo(JSFunctionType, StructureFlags), &s_info); 
     }
 
+    static JS_EXPORTDATA const ClassInfo s_info;
+
 protected:
-    const static unsigned StructureFlags = OverridesHasInstance | Base::StructureFlags;
+    const static unsigned StructureFlags = OverridesHasInstance | OverridesVisitChildren | Base::StructureFlags;
 
-    virtual void visitChildrenVirtual(SlotVisitor&);
     static void visitChildren(JSCell*, SlotVisitor&);
 
 private:
index 29288d8..8bf75ac 100644 (file)
@@ -85,11 +85,11 @@ namespace JSC {
         virtual UString toString(ExecState*) const;
         virtual JSObject* toObject(ExecState*, JSGlobalObject*) const;
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         // Object operations, with the toObject operation included.
         const ClassInfo* classInfo() const;
+        const MethodTable* methodTable() const;
         virtual void put(ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&);
         virtual void put(ExecState*, unsigned propertyName, JSValue);
         virtual bool deleteProperty(ExecState*, const Identifier& propertyName);
@@ -181,11 +181,6 @@ namespace JSC {
         return m_structure.get();
     }
 
-    inline void JSCell::visitChildrenVirtual(SlotVisitor& visitor)
-    {
-        visitChildren(this, visitor);
-    }
-
     inline void JSCell::visitChildren(JSCell* cell, SlotVisitor& visitor)
     {
         JSCell* thisObject = static_cast<JSCell*>(cell);
index 4fc7568..fbedded 100644 (file)
@@ -151,11 +151,6 @@ const UString JSFunction::calculatedDisplayName(ExecState* exec)
     return name(exec);
 }
 
-void JSFunction::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSFunction* thisObject = static_cast<JSFunction*>(cell);
index 1e668e9..91c3ccf 100644 (file)
@@ -135,7 +135,6 @@ namespace JSC {
         virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
         virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode = ExcludeDontEnumProperties);
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
     private:
index 98c11d4..996fc29 100644 (file)
@@ -308,11 +308,6 @@ void JSGlobalObject::resetPrototype(JSGlobalData& globalData, JSValue prototype)
         oldLastInPrototypeChain->setPrototype(globalData, objectPrototype);
 }
 
-void JSGlobalObject::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSGlobalObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
 { 
     JSGlobalObject* thisObject = static_cast<JSGlobalObject*>(cell);
index 3f0b85d..9dfad12 100644 (file)
@@ -175,7 +175,6 @@ namespace JSC {
     public:
         virtual ~JSGlobalObject();
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
index 57899fa..a75c36a 100644 (file)
@@ -68,11 +68,6 @@ static inline void getClassPropertyNames(ExecState* exec, const ClassInfo* class
     }
 }
 
-void JSObject::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSObject* thisObject = static_cast<JSObject*>(cell);
index 27b5cc0..21837ea 100644 (file)
@@ -79,10 +79,11 @@ namespace JSC {
     public:
         typedef JSCell Base;
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         ALWAYS_INLINE void visitChildrenDirect(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
+        virtual UString className() const;
+
         // The inline virtual destructor cannot be the first virtual function declared
         // in the class as it results in the vtable being generated as a weak symbol
         virtual ~JSObject();
@@ -93,8 +94,6 @@ namespace JSC {
         
         Structure* inheritorID(JSGlobalData&);
 
-        virtual UString className() const;
-
         JSValue get(ExecState*, const Identifier& propertyName) const;
         JSValue get(ExecState*, unsigned propertyName) const;
 
@@ -485,6 +484,11 @@ inline bool JSCell::inherits(const ClassInfo* info) const
     return classInfo()->isSubClassOf(info);
 }
 
+inline const MethodTable* JSCell::methodTable() const
+{
+    return &classInfo()->methodTable;
+}
+
 // this method is here to be after the inline declaration of JSCell::inherits
 inline bool JSValue::inherits(const ClassInfo* classInfo) const
 {
index 97025a4..abab79e 100644 (file)
@@ -92,11 +92,6 @@ JSValue JSPropertyNameIterator::get(ExecState* exec, JSObject* base, size_t i)
     return identifier;
 }
 
-void JSPropertyNameIterator::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSPropertyNameIterator::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSPropertyNameIterator* thisObject = static_cast<JSPropertyNameIterator*>(cell);
index c6f6979..97a5032 100644 (file)
@@ -58,7 +58,6 @@ namespace JSC {
             return Structure::create(globalData, globalObject, prototype, TypeInfo(CompoundType, OverridesVisitChildren), &s_info);
         }
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         bool getOffset(size_t i, int& offset)
index 31da80a..b6780ef 100644 (file)
 namespace JSC {
 ASSERT_CLASS_FITS_IN_CELL(JSStaticScopeObject);
 
-void JSStaticScopeObject::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSStaticScopeObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSStaticScopeObject* thisObject = static_cast<JSStaticScopeObject*>(cell);
index 821178a..792d4b0 100644 (file)
@@ -41,7 +41,6 @@ namespace JSC{
             return scopeObject;
         }
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
         bool isDynamicScope(bool& requiresDynamicChecks) const;
         virtual JSObject* toThisObject(ExecState*) const;
index 567da94..372bedd 100644 (file)
@@ -54,6 +54,7 @@ namespace JSC {
 
     struct ClassInfo;
     struct Instruction;
+    struct MethodTable;
 
     template <class T> class WriteBarrierBase;
 
index 69192fe..34df7ea 100644 (file)
@@ -26,9 +26,8 @@ namespace JSC {
 
 ASSERT_CLASS_FITS_IN_CELL(JSWrapperObject);
 
-void JSWrapperObject::visitChildrenVirtual(SlotVisitor& visitor) 
+JSWrapperObject::~JSWrapperObject()
 {
-    visitChildren(this, visitor);
 }
 
 void JSWrapperObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
index 7dd4b28..73713c0 100644 (file)
@@ -44,8 +44,9 @@ namespace JSC {
         explicit JSWrapperObject(JSGlobalData&, Structure*);
         static const unsigned StructureFlags = OverridesVisitChildren | JSNonFinalObject::StructureFlags;
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
+
+        virtual ~JSWrapperObject();
         
     private:
         WriteBarrier<Unknown> m_internalValue;
index 09c8705..f2e6bcc 100644 (file)
@@ -37,11 +37,6 @@ NativeErrorConstructor::NativeErrorConstructor(JSGlobalObject* globalObject, Str
 {
 }
 
-void NativeErrorConstructor::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void NativeErrorConstructor::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     NativeErrorConstructor* thisObject = static_cast<NativeErrorConstructor*>(cell);
index 0a2bb23..67f528d 100644 (file)
@@ -71,7 +71,6 @@ namespace JSC {
         virtual ConstructType getConstructData(ConstructData&);
         virtual CallType getCallDataVirtual(CallData&);
         static CallType getCallData(JSCell*, CallData&);
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         WriteBarrier<Structure> m_errorStructure;
index a5d7fe6..2b84324 100644 (file)
@@ -78,11 +78,6 @@ RegExpObject::~RegExpObject()
 {
 }
 
-void RegExpObject::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void RegExpObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     RegExpObject* thisObject = static_cast<RegExpObject*>(cell);
index e9664a4..e8af6d6 100644 (file)
@@ -81,7 +81,6 @@ namespace JSC {
         void finishCreation(JSGlobalObject*);
         static const unsigned StructureFlags = OverridesVisitChildren | OverridesGetOwnPropertySlot | Base::StructureFlags;
 
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
     private:
index e859c8c..6e2e034 100644 (file)
 
 namespace JSC {
 
+ScopeChainNode::~ScopeChainNode()
+{
+}
+
 #ifndef NDEBUG
 
 void ScopeChainNode::print()
@@ -67,11 +71,6 @@ int ScopeChainNode::localDepth()
     return scopeDepth;
 }
 
-void ScopeChainNode::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void ScopeChainNode::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     ScopeChainNode* thisObject = static_cast<ScopeChainNode*>(cell);
index ac52c67..48385d0 100644 (file)
@@ -45,6 +45,8 @@ namespace JSC {
         {
         }
 
+        virtual ~ScopeChainNode();
+
     protected:
         void finishCreation(JSGlobalData* globalData, JSGlobalObject* globalObject)
         {
@@ -87,7 +89,6 @@ namespace JSC {
 #endif
         
         static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) { return Structure::create(globalData, globalObject, proto, TypeInfo(CompoundType, StructureFlags), &s_info); }
-        virtual void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
         static JS_EXPORTDATA const ClassInfo s_info;
 
index b67c87f..d7afa15 100644 (file)
@@ -724,11 +724,6 @@ void Structure::getPropertyNames(JSGlobalData& globalData, PropertyNameArray& pr
     }
 }
 
-void Structure::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void Structure::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     Structure* thisObject = static_cast<Structure*>(cell);
index 958ad1b..84fdd7b 100644 (file)
@@ -130,7 +130,6 @@ namespace JSC {
         JSValue storedPrototype() const { return m_prototype.get(); }
         JSValue prototypeForLookup(ExecState*) const;
         StructureChain* prototypeChain(ExecState*) const;
-        void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         Structure* previousID() const { ASSERT(structure()->classInfo() == &s_info); return m_previous.get(); }
index a7362a9..2bd781d 100644 (file)
@@ -43,11 +43,6 @@ StructureChain::~StructureChain()
 {
 }
 
-void StructureChain::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void StructureChain::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     StructureChain* thisObject = static_cast<StructureChain*>(cell);
index 190c5c2..281f602 100644 (file)
@@ -52,7 +52,6 @@ namespace JSC {
             return chain;
         }
         WriteBarrier<Structure>* head() { return m_vector.get(); }
-        void visitChildrenVirtual(SlotVisitor&);
         static void visitChildren(JSCell*, SlotVisitor&);
 
         static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype) { return Structure::create(globalData, globalObject, prototype, TypeInfo(CompoundType, OverridesVisitChildren), &s_info); }
index 7be60e7..25bcdd6 100644 (file)
@@ -1,3 +1,16 @@
+2011-09-29  Mark Hahnenberg  <mhahnenberg@apple.com>
+
+        De-virtualize JSCell::visitChildrenVirtual and remove all other visitChildrenVirtual methods
+        https://bugs.webkit.org/show_bug.cgi?id=68839
+
+        Reviewed by Geoffrey Garen.
+
+        Removed the remaining visitChildrenVirtual methods.  This patch completes the process of 
+        de-virtualizing visitChildren.
+
+        * UserObjectImp.cpp:
+        * UserObjectImp.h:
+
 2011-09-27  Mark Hahnenberg  <mhahnenberg@apple.com>
 
         Add static version of JSCell::getCallData
index 3b4144b..6325994 100644 (file)
@@ -410,11 +410,6 @@ UString UserObjectImp::toString(ExecState *exec) const
     return result;
 }
 
-void UserObjectImp::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void UserObjectImp::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     UserObjectImp* thisObject = static_cast<UserObjectImp*>(cell);
index 0485435..2d56d4a 100644 (file)
@@ -63,7 +63,6 @@ public:
     virtual double toNumber(ExecState *exec) const;
     virtual UString toString(ExecState *exec) const;
 
-    virtual void visitChildrenVirtual(SlotVisitor&);
     static void visitChildren(JSCell*, SlotVisitor&);
 
     JSUserObject *GetJSUserObject() const;
index 62786ac..a129dc6 100644 (file)
@@ -1,3 +1,50 @@
+2011-09-29  Mark Hahnenberg  <mhahnenberg@apple.com>
+
+        De-virtualize JSCell::visitChildrenVirtual and remove all other visitChildrenVirtual methods
+        https://bugs.webkit.org/show_bug.cgi?id=68839
+
+        Reviewed by Geoffrey Garen.
+
+        No new tests.
+
+        Removed the remaining visitChildrenVirtual methods.  This patch completes the process of 
+        de-virtualizing visitChildren.
+
+        * WebCore.exp.in:
+        * bindings/js/JSAttrCustom.cpp:
+        * bindings/js/JSAudioContextCustom.cpp:
+        * bindings/js/JSCSSRuleCustom.cpp:
+        * bindings/js/JSCSSStyleDeclarationCustom.cpp:
+        * bindings/js/JSCanvasRenderingContextCustom.cpp:
+        * bindings/js/JSDOMGlobalObject.cpp:
+        (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject):
+        (WebCore::JSDOMGlobalObject::finishCreation):
+        * bindings/js/JSDOMGlobalObject.h:
+        * bindings/js/JSDOMWindowCustom.cpp:
+        * bindings/js/JSDOMWindowShell.cpp:
+        * bindings/js/JSDOMWindowShell.h:
+        * bindings/js/JSJavaScriptAudioNodeCustom.cpp:
+        * bindings/js/JSMessageChannelCustom.cpp:
+        * bindings/js/JSMessagePortCustom.cpp:
+        * bindings/js/JSNamedNodeMapCustom.cpp:
+        * bindings/js/JSNodeCustom.cpp:
+        * bindings/js/JSNodeFilterCustom.cpp:
+        * bindings/js/JSNodeIteratorCustom.cpp:
+        * bindings/js/JSSVGElementInstanceCustom.cpp:
+        * bindings/js/JSSharedWorkerCustom.cpp:
+        * bindings/js/JSStyleSheetCustom.cpp:
+        * bindings/js/JSTreeWalkerCustom.cpp:
+        * bindings/js/JSWebGLRenderingContextCustom.cpp:
+        * bindings/js/JSWorkerContextCustom.cpp:
+        * bindings/js/JSXMLHttpRequestCustom.cpp:
+        * bindings/js/JSXPathResultCustom.cpp:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateHeader):
+        (GenerateImplementation):
+        * bridge/qt/qt_instance.cpp:
+        * bridge/qt/qt_runtime.cpp:
+        * bridge/qt/qt_runtime.h:
+
 2011-09-23  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
 
         [Qt] Fix build against Qt5 after refactor of widgets out of QtGUi
index 47041b0..2ee043d 100644 (file)
@@ -814,7 +814,6 @@ __ZN7WebCore6Editor6indentEv
 __ZN7WebCore6Editor7CommandC1Ev
 __ZN7WebCore6Editor7commandERKN3WTF6StringE
 __ZN7WebCore6Editor7outdentEv
-__ZN7WebCore6JSNode20visitChildrenVirtualERN3JSC11SlotVisitorE
 __ZN7WebCore6JSNode3putEPN3JSC9ExecStateERKNS1_10IdentifierENS1_7JSValueERNS1_15PutPropertySlotE
 __ZN7WebCore6JSNode6s_infoE
 __ZN7WebCore6Region5uniteERKS0_
index 3b1086d..ac1ae60 100644 (file)
@@ -39,11 +39,6 @@ namespace WebCore {
 
 using namespace HTMLNames;
 
-void JSAttr::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSAttr::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSAttr* thisObject = static_cast<JSAttr*>(cell);
index 4e6a46d..5bfa35f 100644 (file)
@@ -39,11 +39,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSAudioContext::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSAudioContext::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSAudioContext* thisObject = static_cast<JSAudioContext*>(cell);
index 71b06ce..4ecaa52 100644 (file)
@@ -48,11 +48,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSCSSRule::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSCSSRule::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSCSSRule* thisObject = static_cast<JSCSSRule*>(cell);
index cd9acee..33d6af1 100644 (file)
@@ -43,11 +43,6 @@ using namespace WTF;
 
 namespace WebCore {
 
-void JSCSSStyleDeclaration::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSCSSStyleDeclaration::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSCSSStyleDeclaration* thisObject = static_cast<JSCSSStyleDeclaration*>(cell);
index da6028c..19379ad 100644 (file)
@@ -39,11 +39,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSCanvasRenderingContext::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSCanvasRenderingContext::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSCanvasRenderingContext* thisObject = static_cast<JSCanvasRenderingContext*>(cell);
index 6f4d2a6..45adb7b 100644 (file)
@@ -49,15 +49,14 @@ JSDOMGlobalObject::JSDOMGlobalObject(JSGlobalData& globalData, Structure* struct
 {
 }
 
-void JSDOMGlobalObject::finishCreation(JSGlobalData& globalData, JSObject* thisValue)
+JSDOMGlobalObject::~JSDOMGlobalObject()
 {
-    Base::finishCreation(globalData, thisValue);
-    ASSERT(inherits(&s_info));
 }
 
-void JSDOMGlobalObject::visitChildrenVirtual(JSC::SlotVisitor& visitor)
+void JSDOMGlobalObject::finishCreation(JSGlobalData& globalData, JSObject* thisValue)
 {
-    visitChildren(this, visitor);
+    Base::finishCreation(globalData, thisValue);
+    ASSERT(inherits(&s_info));
 }
 
 void JSDOMGlobalObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
index 99a631f..e3c3287 100644 (file)
@@ -47,6 +47,7 @@ namespace WebCore {
         struct JSDOMGlobalObjectData;
 
         JSDOMGlobalObject(JSC::JSGlobalData&, JSC::Structure*, PassRefPtr<DOMWrapperWorld>);
+        virtual ~JSDOMGlobalObject();
         void finishCreation(JSC::JSGlobalData&, JSC::JSObject* thisValue);
 
     public:
@@ -64,7 +65,6 @@ namespace WebCore {
         void setInjectedScript(JSObject*);
         JSObject* injectedScript() const;
 
-        virtual void visitChildrenVirtual(JSC::SlotVisitor&);
         static void visitChildren(JSC::JSCell*, JSC::SlotVisitor&);
 
         DOMWrapperWorld* world() { return m_world.get(); }
index adb051f..04b5b97 100644 (file)
@@ -77,11 +77,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSDOMWindow::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSDOMWindow::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSDOMWindow* thisObject = static_cast<JSDOMWindow*>(cell);
index b776be3..1f2b9ed 100644 (file)
@@ -83,11 +83,6 @@ void JSDOMWindowShell::setWindow(PassRefPtr<DOMWindow> domWindow)
 // JSObject methods
 // ----
 
-void JSDOMWindowShell::visitChildrenVirtual(JSC::SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSDOMWindowShell::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSDOMWindowShell* thisObject = static_cast<JSDOMWindowShell*>(cell);
index e9abc15..012d5b7 100644 (file)
@@ -77,7 +77,6 @@ namespace WebCore {
         void* operator new(size_t);
         static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | JSC::OverridesGetPropertyNames | Base::StructureFlags;
 
-        virtual void visitChildrenVirtual(JSC::SlotVisitor&);
         static void visitChildren(JSC::JSCell*, JSC::SlotVisitor&);
         virtual JSC::UString className() const;
         virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
index 004d8be..4ad4d4d 100644 (file)
@@ -34,11 +34,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSJavaScriptAudioNode::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSJavaScriptAudioNode::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSJavaScriptAudioNode* thisObject = static_cast<JSJavaScriptAudioNode*>(cell);
index fa19c9d..8a047a1 100644 (file)
@@ -33,11 +33,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSMessageChannel::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSMessageChannel::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSMessageChannel* thisObject = static_cast<JSMessageChannel*>(cell);
index 9eed739..51ebf88 100644 (file)
@@ -42,11 +42,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSMessagePort::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSMessagePort::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSMessagePort* thisObject = static_cast<JSMessagePort*>(cell);
index a10d52a..45a9ac0 100644 (file)
@@ -35,11 +35,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSNamedNodeMap::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 bool JSNamedNodeMap::canGetItemsForName(ExecState*, NamedNodeMap* impl, const Identifier& propertyName)
 {
     return impl->getNamedItem(identifierToString(propertyName));
index 9715266..3f2f159 100644 (file)
@@ -192,11 +192,6 @@ ScopeChainNode* JSNode::pushEventHandlerScope(ExecState*, ScopeChainNode* node)
     return node;
 }
 
-void JSNode::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSNode::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSNode* thisObject = static_cast<JSNode*>(cell);
index 56081ec..e94098b 100644 (file)
@@ -36,11 +36,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSNodeFilter::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSNodeFilter::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSNodeFilter* thisObject = static_cast<JSNodeFilter*>(cell);
index 7055946..813e000 100644 (file)
@@ -29,11 +29,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSNodeIterator::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSNodeIterator::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSNodeIterator* thisObject = static_cast<JSNodeIterator*>(cell);
index 87e6bf6..beb99a8 100644 (file)
 
 namespace WebCore {
 
-void JSSVGElementInstance::visitChildrenVirtual(JSC::SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSSVGElementInstance::visitChildren(JSC::JSCell* cell, JSC::SlotVisitor& visitor)
 {
     JSSVGElementInstance* thisObject = static_cast<JSSVGElementInstance*>(cell);
index 9f39a14..4d9d22d 100644 (file)
@@ -43,11 +43,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSSharedWorker::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSSharedWorker::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSSharedWorker* thisObject = static_cast<JSSharedWorker*>(cell);
index 2d726ab..5defbcc 100644 (file)
@@ -35,11 +35,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSStyleSheet::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSStyleSheet::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSStyleSheet* thisObject = static_cast<JSStyleSheet*>(cell);
index 95edc05..57f23b0 100644 (file)
@@ -29,11 +29,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSTreeWalker::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSTreeWalker::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSTreeWalker* thisObject = static_cast<JSTreeWalker*>(cell);
index 0e47f53..5489b8a 100644 (file)
@@ -192,11 +192,6 @@ static JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, WebGLExten
     return jsNull();
 }
 
-void JSWebGLRenderingContext::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSWebGLRenderingContext::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSWebGLRenderingContext* thisObject = static_cast<JSWebGLRenderingContext*>(cell);
index f900496..67f2e99 100644 (file)
@@ -53,11 +53,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSWorkerContext::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSWorkerContext::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSWorkerContext* thisObject = static_cast<JSWorkerContext*>(cell);
index 6091383..62f6169 100644 (file)
@@ -54,11 +54,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSXMLHttpRequest::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSXMLHttpRequest::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSXMLHttpRequest* thisObject = static_cast<JSXMLHttpRequest*>(cell);
index 09942f5..2341b43 100644 (file)
@@ -37,11 +37,6 @@ using namespace JSC;
 
 namespace WebCore {
 
-void JSXPathResult::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void JSXPathResult::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     JSXPathResult* thisObject = static_cast<JSXPathResult*>(cell);
index 684f237..0ae7e2c 100644 (file)
@@ -878,7 +878,6 @@ sub GenerateHeader
 
     # visit function
     if ($needsMarkChildren) {
-        push(@headerContent, "    virtual void visitChildrenVirtual(JSC::SlotVisitor&);\n");
         push(@headerContent, "    static void visitChildren(JSCell*, JSC::SlotVisitor&);\n\n");
         $structureFlags{"JSC::OverridesVisitChildren"} = 1;
     }
@@ -2202,11 +2201,6 @@ sub GenerateImplementation
         }
         
         if ($needsMarkChildren && !$dataNode->extendedAttributes->{"CustomMarkFunction"}) {
-            push(@implContent, "void ${className}::visitChildrenVirtual(SlotVisitor& visitor)\n");
-            push(@implContent, "{\n");
-            push(@implContent, "    visitChildren(this, visitor);\n");
-            push(@implContent, "}\n\n");
-
             push(@implContent, "void ${className}::visitChildren(JSCell* cell, SlotVisitor& visitor)\n");
             push(@implContent, "{\n");
             push(@implContent, "    ${className}* thisObject = static_cast<${className}*>(cell);\n");
index 7de98e8..0d61a60 100644 (file)
@@ -62,11 +62,6 @@ public:
     
     static const ClassInfo s_info;
 
-    virtual void visitChildrenVirtual(SlotVisitor& visitor)
-    {
-        visitChildren(this, visitor);
-    }
-
     static void visitChildren(JSCell* cell, SlotVisitor& visitor)
     {
         QtRuntimeObject* thisObject = static_cast<QtRuntimeObject*>(cell);
index 67fcceb..5557b13 100644 (file)
@@ -1439,11 +1439,6 @@ void QtRuntimeMetaMethod::finishCreation(ExecState* exec, const Identifier& iden
     d->m_allowPrivate = allowPrivate;
 }
 
-void QtRuntimeMetaMethod::visitChildrenVirtual(SlotVisitor& visitor)
-{
-    visitChildren(this, visitor);
-}
-
 void QtRuntimeMetaMethod::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
     QtRuntimeMetaMethod* thisObject = static_cast<QtRuntimeMetaMethod*>(cell);
index 83e5a6c..9a27629 100644 (file)
@@ -168,7 +168,6 @@ public:
     virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
     virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
 
-    virtual void visitChildrenVirtual(SlotVisitor&);
     static void visitChildren(JSCell*, SlotVisitor&);
 
 protected: