Title: [89069] trunk/Source
Revision
89069
Author
[email protected]
Date
2011-06-16 15:01:43 -0700 (Thu, 16 Jun 2011)

Log Message

2011-06-16  Geoffrey Garen  <[email protected]>

        Reviewed by Oliver Hunt.

        Introduced SlotVisitor into the project
        https://bugs.webkit.org/show_bug.cgi?id=62820
        
        This resolves a class vs typedef forward declaration issue, and gives all
        exported symbols the correct names.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * _javascript_Core.exp:
        * _javascript_Core.gypi:
        * _javascript_Core.vcproj/_javascript_Core/_javascript_Core.def:
        * _javascript_Core.xcodeproj/project.pbxproj: Build!

        * bytecode/EvalCodeCache.h:
        * heap/HandleHeap.h:
        * heap/Heap.cpp:
        (JSC::Heap::Heap):
        (JSC::Heap::markRoots):
        * heap/Heap.h:
        * heap/HeapRootVisitor.h: Replaced MarkStack with SlotVisitor. Now no
        clients operate on a MarkStack.

        * heap/MarkStack.cpp:
        (JSC::SlotVisitor::visitChildren):
        (JSC::SlotVisitor::drain):
        * heap/SlotVisitor.h: Added.
        (JSC::SlotVisitor::SlotVisitor): Used 'protected' and a little cheesy
        inheritance to give SlotVisitor all the attributes of MarkStack without
        making this change giant. Over time, we will move more behavior into
        SlotVisitor and its subclasses.

        * heap/MarkStack.h:
        * heap/NewSpace.h: Replaced MarkStack with SlotVisitor. Now no
        clients operate on a MarkStack.

        * runtime/ArgList.h:
        * runtime/JSCell.h:
        * runtime/JSObject.h:
        * runtime/ScopeChain.h:
        * runtime/SmallStrings.h:
        * runtime/Structure.h: Replaced MarkStack with SlotVisitor. Now no
        clients operate on a MarkStack.
2011-06-16  Geoffrey Garen  <[email protected]>

        Reviewed by Oliver Hunt.

        Introduced SlotVisitor into the project
        https://bugs.webkit.org/show_bug.cgi?id=62820

        This resolves a class vs typedef forward declaration issue, and gives all
        exported symbols the correct names.

        * dom/EventListener.h:
        * dom/Node.h:
        * dom/NodeFilterCondition.h:

Modified Paths

Added Paths

Diff

Modified: trunk/Source/_javascript_Core/CMakeLists.txt (89068 => 89069)


--- trunk/Source/_javascript_Core/CMakeLists.txt	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/CMakeLists.txt	2011-06-16 22:01:43 UTC (rev 89069)
@@ -44,6 +44,7 @@
 
     heap/Heap.cpp
     heap/HandleHeap.cpp
+    heap/SlotVisitor.cpp
     heap/HandleStack.cpp
     heap/MachineStackMarker.cpp
     heap/MarkedBlock.cpp

Modified: trunk/Source/_javascript_Core/ChangeLog (89068 => 89069)


--- trunk/Source/_javascript_Core/ChangeLog	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-06-16 22:01:43 UTC (rev 89069)
@@ -1,3 +1,50 @@
+2011-06-16  Geoffrey Garen  <[email protected]>
+
+        Reviewed by Oliver Hunt.
+
+        Introduced SlotVisitor into the project
+        https://bugs.webkit.org/show_bug.cgi?id=62820
+        
+        This resolves a class vs typedef forward declaration issue, and gives all
+        exported symbols the correct names.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * _javascript_Core.exp:
+        * _javascript_Core.gypi:
+        * _javascript_Core.vcproj/_javascript_Core/_javascript_Core.def:
+        * _javascript_Core.xcodeproj/project.pbxproj: Build!
+
+        * bytecode/EvalCodeCache.h:
+        * heap/HandleHeap.h:
+        * heap/Heap.cpp:
+        (JSC::Heap::Heap):
+        (JSC::Heap::markRoots):
+        * heap/Heap.h:
+        * heap/HeapRootVisitor.h: Replaced MarkStack with SlotVisitor. Now no
+        clients operate on a MarkStack.
+
+        * heap/MarkStack.cpp:
+        (JSC::SlotVisitor::visitChildren):
+        (JSC::SlotVisitor::drain):
+        * heap/SlotVisitor.h: Added.
+        (JSC::SlotVisitor::SlotVisitor): Used 'protected' and a little cheesy
+        inheritance to give SlotVisitor all the attributes of MarkStack without
+        making this change giant. Over time, we will move more behavior into
+        SlotVisitor and its subclasses.
+
+        * heap/MarkStack.h:
+        * heap/NewSpace.h: Replaced MarkStack with SlotVisitor. Now no
+        clients operate on a MarkStack.
+
+        * runtime/ArgList.h:
+        * runtime/JSCell.h:
+        * runtime/JSObject.h:
+        * runtime/ScopeChain.h:
+        * runtime/SmallStrings.h:
+        * runtime/Structure.h: Replaced MarkStack with SlotVisitor. Now no
+        clients operate on a MarkStack.
+
 2011-06-15  Oliver Hunt  <[email protected]>
 
         Reviewed by Geoffrey Garen.

Modified: trunk/Source/_javascript_Core/GNUmakefile.list.am (89068 => 89069)


--- trunk/Source/_javascript_Core/GNUmakefile.list.am	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/GNUmakefile.list.am	2011-06-16 22:01:43 UTC (rev 89069)
@@ -126,6 +126,7 @@
 	Source/_javascript_Core/heap/Handle.h \
 	Source/_javascript_Core/heap/HandleHeap.cpp \
 	Source/_javascript_Core/heap/HandleHeap.h \
+	Source/_javascript_Core/heap/SlotVisitor.h \
 	Source/_javascript_Core/heap/HandleStack.cpp \
 	Source/_javascript_Core/heap/HandleStack.h \
 	Source/_javascript_Core/heap/HandleTypes.h \

Modified: trunk/Source/_javascript_Core/_javascript_Core.exp (89068 => 89069)


--- trunk/Source/_javascript_Core/_javascript_Core.exp	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/_javascript_Core.exp	2011-06-16 22:01:43 UTC (rev 89069)
@@ -155,7 +155,7 @@
 __ZN3JSC14JSGlobalObject10globalExecEv
 __ZN3JSC14JSGlobalObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectEj
 __ZN3JSC14JSGlobalObject12defineSetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectEj
-__ZN3JSC14JSGlobalObject13visitChildrenERNS_9MarkStackE
+__ZN3JSC14JSGlobalObject13visitChildrenERNS_11SlotVisitorE
 __ZN3JSC14JSGlobalObject16addStaticGlobalsEPNS0_18GlobalPropertyInfoEi
 __ZN3JSC14JSGlobalObject17putWithAttributesEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj
 __ZN3JSC14JSGlobalObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
@@ -172,8 +172,8 @@
 __ZN3JSC14TimeoutChecker10didTimeOutEPNS_9ExecStateE
 __ZN3JSC14TimeoutChecker5resetEv
 __ZN3JSC14throwTypeErrorEPNS_9ExecStateE
-__ZN3JSC15JSWrapperObject13visitChildrenERNS_9MarkStackE
-__ZN3JSC15WeakHandleOwner26isReachableFromOpaqueRootsENS_6HandleINS_7UnknownEEEPvRNS_9MarkStackE
+__ZN3JSC15JSWrapperObject13visitChildrenERNS_11SlotVisitorE
+__ZN3JSC15WeakHandleOwner26isReachableFromOpaqueRootsENS_6HandleINS_7UnknownEEEPvRNS_11SlotVisitorE
 __ZN3JSC15WeakHandleOwner8finalizeENS_6HandleINS_7UnknownEEEPv
 __ZN3JSC15WeakHandleOwnerD2Ev
 __ZN3JSC15createTypeErrorEPNS_9ExecStateERKNS_7UStringE
@@ -261,7 +261,7 @@
 __ZN3JSC6JSLockC1EPNS_9ExecStateE
 __ZN3JSC6RegExp6createEPNS_12JSGlobalDataERKNS_7UStringENS_11RegExpFlagsE
 __ZN3JSC6RegExpD1Ev
-__ZN3JSC7JSArray13visitChildrenERNS_9MarkStackE
+__ZN3JSC7JSArray13visitChildrenERNS_11SlotVisitorE
 __ZN3JSC7JSArray15setSubclassDataEPv
 __ZN3JSC7JSArray18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
 __ZN3JSC7JSArray6s_infoE
@@ -293,7 +293,7 @@
 __ZN3JSC8JSObject12defineSetterEPNS_9ExecStateERKNS_10IdentifierEPS0_j
 __ZN3JSC8JSObject12lookupGetterEPNS_9ExecStateERKNS_10IdentifierE
 __ZN3JSC8JSObject12lookupSetterEPNS_9ExecStateERKNS_10IdentifierE
-__ZN3JSC8JSObject13visitChildrenERNS_9MarkStackE
+__ZN3JSC8JSObject13visitChildrenERNS_11SlotVisitorE
 __ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
 __ZN3JSC8JSObject14deletePropertyEPNS_9ExecStateEj
 __ZN3JSC8JSObject15unwrappedObjectEv

Modified: trunk/Source/_javascript_Core/_javascript_Core.gypi (89068 => 89069)


--- trunk/Source/_javascript_Core/_javascript_Core.gypi	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/_javascript_Core.gypi	2011-06-16 22:01:43 UTC (rev 89069)
@@ -30,6 +30,7 @@
             'heap/ConservativeRoots.h',
             'heap/Handle.h',
             'heap/HandleHeap.h',
+            'heap/SlotVisitor.h',
             'heap/HandleStack.h',
             'heap/HandleTypes.h',
             'heap/Heap.h',

Modified: trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def (89068 => 89069)


--- trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcproj/_javascript_Core/_javascript_Core.def	2011-06-16 22:01:43 UTC (rev 89069)
@@ -227,7 +227,7 @@
     ?isGetterSetter@JSCell@JSC@@UBE_NXZ
     ?isHostFunctionNonInline@JSFunction@JSC@@ABE_NXZ
     ?isMainThread@WTF@@YA_NXZ
-    ?isReachableFromOpaqueRoots@WeakHandleOwner@JSC@@UAE_NV?$Handle@W4Unknown@JSC@@@2@PAXAAVMarkStack@2@@Z
+    ?isReachableFromOpaqueRoots@WeakHandleOwner@JSC@@UAE_NV?$Handle@W4Unknown@JSC@@@2@PAXAAVSlotVisitor@2@@Z
     ?isValidAllocation@Heap@JSC@@AAE_NI@Z
     ?isValidCallee@JSValue@JSC@@QAE_NXZ
     ?isVariableObject@JSVariableObject@JSC@@UBE_NXZ
@@ -365,10 +365,10 @@
     ?unprotect@Heap@JSC@@QAE_NVJSValue@2@@Z
     ?unwrappedObject@JSObject@JSC@@UAEPAV12@XZ
     ?utf8@UString@JSC@@QBE?AVCString@WTF@@_N@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
+    ?visitChildren@JSDOMGlobalObject@WebCore@@UAEXAAVSlotVisitor@JSC@@@Z
+    ?visitChildren@JSObject@JSC@@UAEXAAVSlotVisitor@2@@Z
+    ?visitChildren@JSWrapperObject@JSC@@EAEXAAVSlotVisitor@2@@Z
+    ?visitChildren@ScopeChainNode@JSC@@UAEXAAVSlotVisitor@2@@Z
     ?vtableAnchor@InternalFunction@JSC@@EAEXXZ
     ?wait@ThreadCondition@WTF@@QAEXAAVMutex@2@@Z
     ?waitForThreadCompletion@WTF@@YAHIPAPAX@Z

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (89068 => 89069)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2011-06-16 22:01:43 UTC (rev 89069)
@@ -166,6 +166,7 @@
 		147F39D7107EC37600427A48 /* JSVariableObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC22A39A0E16E14800AF21C8 /* JSVariableObject.cpp */; };
 		1482B74E0A43032800517CFC /* JSStringRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1482B74C0A43032800517CFC /* JSStringRef.cpp */; };
 		1482B7E40A43076000517CFC /* JSObjectRef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1482B7E20A43076000517CFC /* JSObjectRef.cpp */; };
+		148B572813AA955100DBC90A /* SlotVisitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 148B572713AA955100DBC90A /* SlotVisitor.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		148CD1D8108CF902008163C6 /* JSContextRefPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 148CD1D7108CF902008163C6 /* JSContextRefPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		148F21AA107EC53A0042EC2C /* BytecodeGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 969A07200ED1CE3300F1F681 /* BytecodeGenerator.cpp */; };
 		148F21B0107EC5410042EC2C /* Lexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F692A8650255597D01FF60F7 /* Lexer.cpp */; };
@@ -794,6 +795,7 @@
 		1482B7E20A43076000517CFC /* JSObjectRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSObjectRef.cpp; sourceTree = "<group>"; };
 		148A1626095D16BB00666D0D /* ListRefPtr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ListRefPtr.h; sourceTree = "<group>"; };
 		148A1ECD0D10C23B0069A47C /* RefPtrHashMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RefPtrHashMap.h; sourceTree = "<group>"; };
+		148B572713AA955100DBC90A /* SlotVisitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SlotVisitor.h; path = ../../../webkit/Source/_javascript_Core/heap/SlotVisitor.h; sourceTree = SOURCE_ROOT; };
 		148CD1D7108CF902008163C6 /* JSContextRefPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSContextRefPrivate.h; sourceTree = "<group>"; };
 		149559ED0DDCDDF700648087 /* DebuggerCallFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DebuggerCallFrame.cpp; sourceTree = "<group>"; };
 		149B24FF0D8AF6D1009CB8C7 /* Register.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Register.h; sourceTree = "<group>"; };
@@ -1514,6 +1516,7 @@
 				14D2F3D9139F4BE200491031 /* NewSpace.h */,
 				142A1D8113A19C84009DA5FE /* OldSpace.cpp */,
 				142A1D8213A19C84009DA5FE /* OldSpace.h */,
+				148B572713AA955100DBC90A /* SlotVisitor.h */,
 				142E3132134FF0A600AFADB5 /* Strong.h */,
 				141448CC13A1783700F5BA1A /* TinyBloomFilter.h */,
 				142E3133134FF0A600AFADB5 /* Weak.h */,
@@ -2566,6 +2569,7 @@
 				141448CB13A176EC00F5BA1A /* MarkedBlockSet.h in Headers */,
 				141448CD13A1783700F5BA1A /* TinyBloomFilter.h in Headers */,
 				142A1D8413A19C84009DA5FE /* OldSpace.h in Headers */,
+				148B572813AA955100DBC90A /* SlotVisitor.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Modified: trunk/Source/_javascript_Core/bytecode/EvalCodeCache.h (89068 => 89069)


--- trunk/Source/_javascript_Core/bytecode/EvalCodeCache.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/bytecode/EvalCodeCache.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -42,7 +42,7 @@
 namespace JSC {
 
     class MarkStack;
-    typedef MarkStack SlotVisitor;
+    class SlotVisitor;
 
     class EvalCodeCache {
     public:

Modified: trunk/Source/_javascript_Core/heap/HandleHeap.h (89068 => 89069)


--- trunk/Source/_javascript_Core/heap/HandleHeap.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/heap/HandleHeap.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -39,7 +39,7 @@
 class JSGlobalData;
 class JSValue;
 class MarkStack;
-typedef MarkStack SlotVisitor;
+class SlotVisitor;
 
 class WeakHandleOwner {
 public:

Modified: trunk/Source/_javascript_Core/heap/Heap.cpp (89068 => 89069)


--- trunk/Source/_javascript_Core/heap/Heap.cpp	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/heap/Heap.cpp	2011-06-16 22:01:43 UTC (rev 89069)
@@ -246,7 +246,7 @@
     , m_markListSet(0)
     , m_activityCallback(DefaultGCActivityCallback::create(this))
     , m_machineThreads(this)
-    , m_markStack(globalData->jsArrayVPtr)
+    , m_slotVisitor(globalData->jsArrayVPtr)
     , m_handleHeap(globalData)
     , m_globalData(globalData)
 {
@@ -414,7 +414,7 @@
 
     clearMarks();
 
-    MarkStack& visitor = m_markStack;
+    SlotVisitor& visitor = m_slotVisitor;
     HeapRootVisitor heapRootVisitor(visitor);
 
     visitor.append(machineThreadRoots);

Modified: trunk/Source/_javascript_Core/heap/Heap.h (89068 => 89069)


--- trunk/Source/_javascript_Core/heap/Heap.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/heap/Heap.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -24,7 +24,7 @@
 
 #include "HandleHeap.h"
 #include "HandleStack.h"
-#include "MarkStack.h"
+#include "SlotVisitor.h"
 #include "MarkedBlockSet.h"
 #include "NewSpace.h"
 #include <wtf/Forward.h>
@@ -40,12 +40,11 @@
     class JSGlobalData;
     class JSValue;
     class LiveObjectIterator;
-    class MarkStack;
     class MarkedArgumentBuffer;
     class RegisterFile;
     class UString;
     class WeakGCHandlePool;
-    typedef MarkStack SlotVisitor;
+    class SlotVisitor;
 
     typedef std::pair<JSValue, UString> ValueStringPair;
     typedef HashCountedSet<JSCell*> ProtectCountSet;
@@ -155,7 +154,7 @@
         OwnPtr<GCActivityCallback> m_activityCallback;
         
         MachineThreads m_machineThreads;
-        MarkStack m_markStack;
+        SlotVisitor m_slotVisitor;
         HandleHeap m_handleHeap;
         HandleStack m_handleStack;
 

Modified: trunk/Source/_javascript_Core/heap/HeapRootVisitor.h (89068 => 89069)


--- trunk/Source/_javascript_Core/heap/HeapRootVisitor.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/heap/HeapRootVisitor.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -26,7 +26,7 @@
 #ifndef HeapRootVisitor_h
 #define HeapRootVisitor_h
 
-#include "MarkStack.h"
+#include "SlotVisitor.h"
 
 namespace JSC {
 

Modified: trunk/Source/_javascript_Core/heap/MarkStack.cpp (89068 => 89069)


--- trunk/Source/_javascript_Core/heap/MarkStack.cpp	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/heap/MarkStack.cpp	2011-06-16 22:01:43 UTC (rev 89069)
@@ -51,7 +51,7 @@
         internalAppend(roots[i]);
 }
 
-inline void MarkStack::visitChildren(JSCell* cell)
+inline void SlotVisitor::visitChildren(JSCell* cell)
 {
     ASSERT(Heap::isMarked(cell));
     if (cell->structure()->typeInfo().type() < CompoundType) {
@@ -79,7 +79,7 @@
     cell->visitChildren(*this);
 }
 
-void MarkStack::drain()
+void SlotVisitor::drain()
 {
 #if !ASSERT_DISABLED
     ASSERT(!m_isDraining);

Modified: trunk/Source/_javascript_Core/heap/MarkStack.h (89068 => 89069)


--- trunk/Source/_javascript_Core/heap/MarkStack.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/heap/MarkStack.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -93,10 +93,9 @@
         bool containsOpaqueRoot(void*);
         int opaqueRootCount();
 
-        void drain();
         void reset();
 
-    private:
+    protected:
 #if ENABLE(GC_VALIDATION)
         static void validateSet(JSValue*, size_t);
         static void validateValue(JSValue);
@@ -108,7 +107,6 @@
 
         void internalAppend(JSCell*);
         void internalAppend(JSValue);
-        void visitChildren(JSCell*);
 
         void* m_jsArrayVPtr;
         MarkStackArray<MarkSet> m_markSets;
@@ -272,7 +270,7 @@
             internalAppend(value.asCell());
     }
 
-    typedef MarkStack SlotVisitor;
+    class SlotVisitor;
 
 } // namespace JSC
 

Modified: trunk/Source/_javascript_Core/heap/NewSpace.h (89068 => 89069)


--- trunk/Source/_javascript_Core/heap/NewSpace.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/heap/NewSpace.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -41,7 +41,7 @@
     class LiveObjectIterator;
     class MarkStack;
     class WeakGCHandle;
-    typedef MarkStack SlotVisitor;
+    class SlotVisitor;
 
     class NewSpace {
         WTF_MAKE_NONCOPYABLE(NewSpace);

Added: trunk/Source/_javascript_Core/heap/SlotVisitor.h (0 => 89069)


--- trunk/Source/_javascript_Core/heap/SlotVisitor.h	                        (rev 0)
+++ trunk/Source/_javascript_Core/heap/SlotVisitor.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef SlotVisitor_h
+#define SlotVisitor_h
+
+#include "MarkStack.h"
+
+namespace JSC {
+
+class SlotVisitor : public MarkStack {
+public:
+    SlotVisitor(void* jsArrayVPtr);
+
+    void drain();
+
+private:
+    void visitChildren(JSCell*);
+};
+
+inline SlotVisitor::SlotVisitor(void* jsArrayVPtr)
+    : MarkStack(jsArrayVPtr)
+{
+}
+
+} // namespace JSC
+
+#endif // SlotVisitor_h

Modified: trunk/Source/_javascript_Core/runtime/ArgList.h (89068 => 89069)


--- trunk/Source/_javascript_Core/runtime/ArgList.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/runtime/ArgList.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -31,7 +31,7 @@
 namespace JSC {
 
     class MarkStack;
-    typedef MarkStack SlotVisitor;
+    class SlotVisitor;
 
     class MarkedArgumentBuffer {
         WTF_MAKE_NONCOPYABLE(MarkedArgumentBuffer);

Modified: trunk/Source/_javascript_Core/runtime/JSCell.h (89068 => 89069)


--- trunk/Source/_javascript_Core/runtime/JSCell.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/runtime/JSCell.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -29,7 +29,7 @@
 #include "Heap.h"
 #include "JSLock.h"
 #include "JSValueInlineMethods.h"
-#include "MarkStack.h"
+#include "SlotVisitor.h"
 #include "WriteBarrier.h"
 #include <wtf/Noncopyable.h>
 

Modified: trunk/Source/_javascript_Core/runtime/JSObject.h (89068 => 89069)


--- trunk/Source/_javascript_Core/runtime/JSObject.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/runtime/JSObject.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -29,7 +29,6 @@
 #include "Completion.h"
 #include "CallFrame.h"
 #include "JSCell.h"
-#include "MarkStack.h"
 #include "PropertySlot.h"
 #include "PutPropertySlot.h"
 #include "ScopeChain.h"

Modified: trunk/Source/_javascript_Core/runtime/ScopeChain.h (89068 => 89069)


--- trunk/Source/_javascript_Core/runtime/ScopeChain.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/runtime/ScopeChain.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -32,7 +32,7 @@
     class JSObject;
     class MarkStack;
     class ScopeChainIterator;
-    typedef MarkStack SlotVisitor;
+    class SlotVisitor;
     
     class ScopeChainNode : public JSCell {
     public:

Modified: trunk/Source/_javascript_Core/runtime/SmallStrings.h (89068 => 89069)


--- trunk/Source/_javascript_Core/runtime/SmallStrings.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/runtime/SmallStrings.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -37,7 +37,7 @@
     class JSString;
     class MarkStack;
     class SmallStringsStorage;
-    typedef MarkStack SlotVisitor;
+    class SlotVisitor;
 
     static const unsigned maxSingleCharacterString = 0xFF;
 

Modified: trunk/Source/_javascript_Core/runtime/Structure.h (89068 => 89069)


--- trunk/Source/_javascript_Core/runtime/Structure.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/_javascript_Core/runtime/Structure.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -48,7 +48,7 @@
     class PropertyNameArray;
     class PropertyNameArrayData;
     class StructureChain;
-    typedef MarkStack SlotVisitor;
+    class SlotVisitor;
 
     struct ClassInfo;
 

Modified: trunk/Source/WebCore/ChangeLog (89068 => 89069)


--- trunk/Source/WebCore/ChangeLog	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/WebCore/ChangeLog	2011-06-16 22:01:43 UTC (rev 89069)
@@ -1,3 +1,17 @@
+2011-06-16  Geoffrey Garen  <[email protected]>
+
+        Reviewed by Oliver Hunt.
+
+        Introduced SlotVisitor into the project
+        https://bugs.webkit.org/show_bug.cgi?id=62820
+
+        This resolves a class vs typedef forward declaration issue, and gives all
+        exported symbols the correct names.
+
+        * dom/EventListener.h:
+        * dom/Node.h:
+        * dom/NodeFilterCondition.h:
+
 2011-06-16  Abhishek Arya  <[email protected]>
 
         Reviewed by Adam Barth.

Modified: trunk/Source/WebCore/bindings/js/JSCSSRuleListCustom.cpp (89068 => 89069)


--- trunk/Source/WebCore/bindings/js/JSCSSRuleListCustom.cpp	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/WebCore/bindings/js/JSCSSRuleListCustom.cpp	2011-06-16 22:01:43 UTC (rev 89069)
@@ -35,15 +35,15 @@
 
 namespace WebCore {
 
-bool JSCSSRuleListOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, MarkStack& markStack)
+bool JSCSSRuleListOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
 {
     JSCSSRuleList* jsCSSRuleList = static_cast<JSCSSRuleList*>(handle.get().asCell());
     if (!jsCSSRuleList->hasCustomProperties())
         return false;
     if (StyleList* styleList = jsCSSRuleList->impl()->styleList())
-        return markStack.containsOpaqueRoot(root(styleList));
+        return visitor.containsOpaqueRoot(root(styleList));
     if (CSSRule* cssRule = jsCSSRuleList->impl()->item(0))
-        return markStack.containsOpaqueRoot(root(cssRule));
+        return visitor.containsOpaqueRoot(root(cssRule));
     return false;
 }
 

Modified: trunk/Source/WebCore/bindings/js/JSCSSValueCustom.cpp (89068 => 89069)


--- trunk/Source/WebCore/bindings/js/JSCSSValueCustom.cpp	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/WebCore/bindings/js/JSCSSValueCustom.cpp	2011-06-16 22:01:43 UTC (rev 89069)
@@ -45,7 +45,7 @@
 
 namespace WebCore {
 
-bool JSCSSValueOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void* context, MarkStack& markStack)
+bool JSCSSValueOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void* context, SlotVisitor& visitor)
 {
     JSCSSValue* jsCSSValue = static_cast<JSCSSValue*>(handle.get().asCell());
     if (!jsCSSValue->hasCustomProperties())
@@ -54,7 +54,7 @@
     void* root = world->m_cssValueRoots.get(jsCSSValue->impl());
     if (!root)
         return false;
-    return markStack.containsOpaqueRoot(root);
+    return visitor.containsOpaqueRoot(root);
 }
 
 void JSCSSValueOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)

Modified: trunk/Source/WebCore/dom/EventListener.h (89068 => 89069)


--- trunk/Source/WebCore/dom/EventListener.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/WebCore/dom/EventListener.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -25,8 +25,7 @@
 
 namespace JSC {
     class JSObject;
-    class MarkStack;
-    typedef MarkStack SlotVisitor;
+    class SlotVisitor;
 }
 
 namespace WebCore {

Modified: trunk/Source/WebCore/dom/Node.h (89068 => 89069)


--- trunk/Source/WebCore/dom/Node.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/WebCore/dom/Node.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -36,8 +36,7 @@
 #if USE(JSC)
 namespace JSC {
     class JSGlobalData;
-    class MarkStack;
-    typedef MarkStack SlotVisitor;
+    class SlotVisitor;
 }
 #endif
 

Modified: trunk/Source/WebCore/dom/NodeFilterCondition.h (89068 => 89069)


--- trunk/Source/WebCore/dom/NodeFilterCondition.h	2011-06-16 21:54:10 UTC (rev 89068)
+++ trunk/Source/WebCore/dom/NodeFilterCondition.h	2011-06-16 22:01:43 UTC (rev 89069)
@@ -29,8 +29,9 @@
 #include <wtf/RefCounted.h>
 
 namespace JSC {
-    class MarkStack;
-    typedef MarkStack SlotVisitor;
+
+class SlotVisitor;
+
 }
 
 namespace WebCore {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to