2011-01-22 Geoffrey Garen <ggaren@apple.com>
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Jan 2011 20:11:22 +0000 (20:11 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 22 Jan 2011 20:11:22 +0000 (20:11 +0000)
        Reviewed by Geoffrey Garen.

        Rubber-stamped by Maciej Stachowiak.

        A few of Maciej's review suggestions for my last patch.
        https://bugs.webkit.org/show_bug.cgi?id=52946

        SunSpider reports no change.

        * Android.mk:
        * CMakeLists.txt:
        * GNUmakefile.am:
        * JavaScriptCore.gypi:
        * JavaScriptCore.pro:
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj: Updated build systems.

        * runtime/ConservativeSet.cpp: Added.
        (JSC::isPointerAligned):
        (JSC::ConservativeSet::add):
        * runtime/ConservativeSet.h: Added.
        (JSC::ConservativeSet::ConservativeSet):
        (JSC::ConservativeSet::mark): Split ConservativeSet out into its own
        file, and moved the conservative check into ConservativeSet::add, making
        ConservativeSet's responsibility clearer.

        * runtime/Heap.cpp:
        (JSC::Heap::markRoots):
        * runtime/MachineStackMarker.cpp:
        (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
        (JSC::MachineStackMarker::markOtherThreadConservatively):
        * runtime/MachineStackMarker.h:
        * runtime/MarkStack.h: Updated for changes above.

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

14 files changed:
Source/JavaScriptCore/Android.mk
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.am
Source/JavaScriptCore/JavaScriptCore.gypi
Source/JavaScriptCore/JavaScriptCore.pro
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/runtime/ConservativeSet.cpp [new file with mode: 0644]
Source/JavaScriptCore/runtime/ConservativeSet.h [new file with mode: 0644]
Source/JavaScriptCore/runtime/Heap.cpp
Source/JavaScriptCore/runtime/MachineStackMarker.cpp
Source/JavaScriptCore/runtime/MachineStackMarker.h
Source/JavaScriptCore/runtime/MarkStack.h

index 80c8b61e7324470bd401dbfdfb732f310e6654ea..8c0b4c2a82eafebebfb517444a4af78a3ac86889 100644 (file)
@@ -127,6 +127,7 @@ LOCAL_SRC_FILES := \
        runtime/LiteralParser.cpp \
        runtime/Lookup.cpp \
        runtime/MachineStackMarker.cpp \
+       runtime/ConservativeSet.cpp \
        runtime/MarkStack.cpp \
        runtime/MarkStackPosix.cpp \
        runtime/MathObject.cpp \
index 674d2721398a69a11aae5b6c0446ff6653ff26a0..31c77503d49c6f13a44655b201479ec9ce6932e2 100644 (file)
@@ -137,6 +137,7 @@ SET(JavaScriptCore_SOURCES
     runtime/LiteralParser.cpp
     runtime/Lookup.cpp
     runtime/MachineStackMarker.cpp
+    runtime/ConservativeSet.cpp
     runtime/MarkStack.cpp
     runtime/MathObject.cpp
     runtime/NativeErrorConstructor.cpp
index ab15dd728d2c4e839cb3323895584e6abfb15d67..26e2ed64b63a10b55b9df0bfaf549185c8216910 100644 (file)
@@ -1,3 +1,39 @@
+2011-01-22  Geoffrey Garen  <ggaren@apple.com>
+
+        Reviewed by Geoffrey Garen.
+
+        Rubber-stamped by Maciej Stachowiak.
+
+        A few of Maciej's review suggestions for my last patch.
+        https://bugs.webkit.org/show_bug.cgi?id=52946        
+
+        SunSpider reports no change.
+
+        * Android.mk:
+        * CMakeLists.txt:
+        * GNUmakefile.am:
+        * JavaScriptCore.gypi:
+        * JavaScriptCore.pro:
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
+        * JavaScriptCore.xcodeproj/project.pbxproj: Updated build systems.
+
+        * runtime/ConservativeSet.cpp: Added.
+        (JSC::isPointerAligned):
+        (JSC::ConservativeSet::add):
+        * runtime/ConservativeSet.h: Added.
+        (JSC::ConservativeSet::ConservativeSet):
+        (JSC::ConservativeSet::mark): Split ConservativeSet out into its own
+        file, and moved the conservative check into ConservativeSet::add, making
+        ConservativeSet's responsibility clearer.
+
+        * runtime/Heap.cpp:
+        (JSC::Heap::markRoots):
+        * runtime/MachineStackMarker.cpp:
+        (JSC::MachineStackMarker::markCurrentThreadConservativelyInternal):
+        (JSC::MachineStackMarker::markOtherThreadConservatively):
+        * runtime/MachineStackMarker.h:
+        * runtime/MarkStack.h: Updated for changes above.
+
 2011-01-22  Patrick Gansterer  <paroga@webkit.org>
 
         Unreviewed WinCE build fix for r76430.
index 7272471dd5965349f77b18bd975719d041b88358..4f0523f392334585489918ea26638f7e769ac532 100644 (file)
@@ -343,6 +343,8 @@ javascriptcore_sources += \
        Source/JavaScriptCore/runtime/Lookup.h \
        Source/JavaScriptCore/runtime/MachineStackMarker.cpp \
        Source/JavaScriptCore/runtime/MachineStackMarker.h \
+        Source/JavaScriptCore/runtime/ConservativeSet.cpp \
+        Source/JavaScriptCore/runtime/ConservativeSet.h \
        Source/JavaScriptCore/runtime/MarkStack.cpp \
        Source/JavaScriptCore/runtime/MarkStack.h \
        Source/JavaScriptCore/runtime/MathObject.cpp \
index 6ca18a0492333c48292535791e9b702255c4096e..daee7efff4885ca50d4daddd7d5e853dacd791dc 100644 (file)
             'runtime/Lookup.h',
             'runtime/MachineStackMarker.cpp',
             'runtime/MachineStackMarker.h',
+            'runtime/ConservativeSet.cpp',
+            'runtime/ConservativeSet.h',
             'runtime/MarkStack.cpp',
             'runtime/MarkStack.h',
             'runtime/MarkStackWin.cpp',
index 9d254b74a3cd5c269fde190fae913921214117cd..ca31066c7af7aec92549ff1418b10f126e949d70 100644 (file)
@@ -179,6 +179,7 @@ SOURCES += \
     runtime/MarkStackPosix.cpp \
     runtime/MarkStackSymbian.cpp \
     runtime/MarkStackWin.cpp \
+    runtime/ConservativeSet.cpp \
     runtime/MarkStack.cpp \
     runtime/MathObject.cpp \
     runtime/NativeErrorConstructor.cpp \
index 12310d817ed0e7403fb44dd2fb44e752d2a31363..fe3f43940679e0b176a486cf8719786db7ecc28a 100644 (file)
                                RelativePath="..\..\runtime\MachineStackMarker.h"
                                >
                        </File>
+                       <File
+                               RelativePath="..\..\runtime\ConservativeSet.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\..\runtime\ConservativeSet.h"
+                               >
+                       </File>
                        <File
                                RelativePath="..\..\runtime\MarkStack.cpp"
                                >
index 358e38c11abb8f0d13b7d81c7021459123a6e267..473d48c75756a4a6da044ae02b261696c141f1ea 100644 (file)
                14469DED107EC7E700650446 /* StringPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC18C3C50E16EE3300B34460 /* StringPrototype.cpp */; };
                14469DEE107EC7E700650446 /* UString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F692A8850255597D01FF60F7 /* UString.cpp */; };
                146AAB380B66A94400E55F16 /* JSStringRefCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 146AAB370B66A94400E55F16 /* JSStringRefCF.cpp */; };
+               146B16D812EB5B59001BEC1B /* ConservativeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 146B14DB12EB5B12001BEC1B /* ConservativeSet.cpp */; };
                146FE51211A710430087AE66 /* JITCall32_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 146FE51111A710430087AE66 /* JITCall32_64.cpp */; };
                147B83AC0E6DB8C9004775A4 /* BatchedTransitionOptimizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 147B83AA0E6DB8C9004775A4 /* BatchedTransitionOptimizer.h */; };
                147B84630E6DE6B1004775A4 /* PutPropertySlot.h in Headers */ = {isa = PBXBuildFile; fileRef = 147B84620E6DE6B1004775A4 /* PutPropertySlot.h */; settings = {ATTRIBUTES = (Private, ); }; };
                145C507F0D9DF63B0088F6B9 /* CallData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallData.h; sourceTree = "<group>"; };
                146AAB2A0B66A84900E55F16 /* JSStringRefCF.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSStringRefCF.h; sourceTree = "<group>"; };
                146AAB370B66A94400E55F16 /* JSStringRefCF.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSStringRefCF.cpp; sourceTree = "<group>"; };
+               146B14DB12EB5B12001BEC1B /* ConservativeSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConservativeSet.cpp; sourceTree = "<group>"; };
                146FE51111A710430087AE66 /* JITCall32_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITCall32_64.cpp; sourceTree = "<group>"; };
                14760863099C633800437128 /* JSImmediate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSImmediate.cpp; sourceTree = "<group>"; };
                147B83AA0E6DB8C9004775A4 /* BatchedTransitionOptimizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BatchedTransitionOptimizer.h; sourceTree = "<group>"; };
                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>"; };
+               149DAAF212EB559D0083B12B /* ConservativeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConservativeSet.h; sourceTree = "<group>"; };
                14A1563010966365006FA260 /* DateInstanceCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DateInstanceCache.h; sourceTree = "<group>"; };
                14A23D6C0F4E19CE0023CDAD /* JITStubs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITStubs.cpp; sourceTree = "<group>"; };
                14A396A60CD2933100B5B4FF /* SymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolTable.h; sourceTree = "<group>"; };
                                65EA73630BAE35D1001BB560 /* CommonIdentifiers.h */,
                                969A09220ED1E09C00F1F681 /* Completion.cpp */,
                                F5BB2BC5030F772101FCFE1D /* Completion.h */,
+                               146B14DB12EB5B12001BEC1B /* ConservativeSet.cpp */,
+                               149DAAF212EB559D0083B12B /* ConservativeSet.h */,
                                BCA62DFF0E2826310004F30D /* ConstructData.cpp */,
                                BC8F3CCF0DAF17BA00577A80 /* ConstructData.h */,
                                BCD203450E17135E002C7E82 /* DateConstructor.cpp */,
                                E1A862A90D7EBB76001EC6AA /* CollatorICU.cpp in Sources */,
                                147F39C1107EC37600427A48 /* CommonIdentifiers.cpp in Sources */,
                                147F39C2107EC37600427A48 /* Completion.cpp in Sources */,
+                               146B16D812EB5B59001BEC1B /* ConservativeSet.cpp in Sources */,
                                1428082E107EC0570013E7B2 /* ConstructData.cpp in Sources */,
                                86565742115BE3DA00291F40 /* CString.cpp in Sources */,
                                180B9BFE0F16E94D009BDBC5 /* CurrentTime.cpp in Sources */,
                                868BFA0E117CEFD100B908B1 /* StringImpl.cpp in Sources */,
                                14469DEC107EC7E700650446 /* StringObject.cpp in Sources */,
                                14469DED107EC7E700650446 /* StringPrototype.cpp in Sources */,
+                               9335F24D12E6765B002B5553 /* StringRecursionChecker.cpp in Sources */,
                                8626BECF11928E3900782FAB /* StringStatics.cpp in Sources */,
                                BCDE3B430E6C832D001453A7 /* Structure.cpp in Sources */,
                                7E4EE70F0EBB7A5B005934AA /* StructureChain.cpp in Sources */,
                                86704B8612DBA33700A9FE7B /* YarrJIT.cpp in Sources */,
                                86704B8912DBA33700A9FE7B /* YarrPattern.cpp in Sources */,
                                86704B4212DB8A8100A9FE7B /* YarrSyntaxChecker.cpp in Sources */,
-                               9335F24D12E6765B002B5553 /* StringRecursionChecker.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
diff --git a/Source/JavaScriptCore/runtime/ConservativeSet.cpp b/Source/JavaScriptCore/runtime/ConservativeSet.cpp
new file mode 100644 (file)
index 0000000..b276502
--- /dev/null
@@ -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.
+ */
+
+#include "config.h"
+#include "ConservativeSet.h"
+
+namespace JSC {
+
+inline bool isPointerAligned(void* p)
+{
+    return !((intptr_t)(p) & (sizeof(char*) - 1));
+}
+
+void ConservativeSet::add(void* begin, void* end)
+{
+    ASSERT(begin <= end);
+    ASSERT((static_cast<char*>(end) - static_cast<char*>(begin)) < 0x1000000);
+    ASSERT(isPointerAligned(begin));
+    ASSERT(isPointerAligned(end));
+
+    for (char** it = static_cast<char**>(begin); it != static_cast<char**>(end); ++it) {
+        if (!m_heap->contains(*it))
+            continue;
+        m_vector.append(reinterpret_cast<JSCell*>(*it));
+    }
+}
+
+} // namespace JSC
diff --git a/Source/JavaScriptCore/runtime/ConservativeSet.h b/Source/JavaScriptCore/runtime/ConservativeSet.h
new file mode 100644 (file)
index 0000000..9c70950
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2009 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. ``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
+ * 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 ConservativeSet_h
+#define ConservativeSet_h
+
+#include "Heap.h"
+#include "MarkStack.h"
+#include <wtf/Vector.h>
+
+namespace JSC {
+
+class JSCell;
+
+class ConservativeSet {
+public:
+    ConservativeSet(Heap*);
+
+    void add(void* begin, void* end);
+    void mark(MarkStack&);
+
+private:
+    Heap* m_heap;
+    Vector<JSCell*, 64> m_vector;
+};
+
+inline ConservativeSet::ConservativeSet(Heap* heap)
+    : m_heap(heap)
+{
+}
+
+inline void ConservativeSet::mark(MarkStack& markStack)
+{
+    for (size_t i = 0; i < m_vector.size(); ++i)
+        markStack.append(m_vector[i]);
+}
+
+} // namespace JSC
+
+#endif // ConservativeSet_h
index 89f954bd021411df25470b128257b88c3f5b1f34..9ec3799b04cb0a5dabc4f594a07d303814f9e956 100644 (file)
@@ -22,6 +22,7 @@
 #include "Heap.h"
 
 #include "CollectorHeapIterator.h"
+#include "ConservativeSet.h"
 #include "GCActivityCallback.h"
 #include "GCHandle.h"
 #include "Interpreter.h"
@@ -256,9 +257,9 @@ void Heap::markRoots()
     // We gather the conservative set before clearing mark bits, because
     // conservative gathering uses the mark bits from our last mark pass to
     // determine whether a reference is valid.
-    ConservativeSet conservativeSet;
+    ConservativeSet conservativeSet(this);
     m_machineStackMarker.markMachineStackConservatively(conservativeSet);
-    m_machineStackMarker.markConservatively(conservativeSet, registerFile().start(), registerFile().end());
+    conservativeSet.add(registerFile().start(), registerFile().end());
 
     // Reset mark bits.
     m_markedSpace.clearMarkBits();
index 79f9cc4ab8767d70c8d2a034849a2882056ba7db..4430947502a65e63f3faf7b57812fe69e846fdf9 100644 (file)
@@ -21,6 +21,7 @@
 #include "config.h"
 #include "MachineStackMarker.h"
 
+#include "ConservativeSet.h"
 #include "Heap.h"
 #include "JSArray.h"
 #include "JSGlobalData.h"
@@ -211,7 +212,7 @@ void NEVER_INLINE MachineStackMarker::markCurrentThreadConservativelyInternal(Co
     void* begin = m_heap->globalData()->stack().current();
     void* end = m_heap->globalData()->stack().origin();
     swapIfBackwards(begin, end);
-    markConservatively(conservativeSet, begin, end);
+    conservativeSet.add(begin, end);
 }
 
 #if COMPILER(GCC)
@@ -373,12 +374,12 @@ void MachineStackMarker::markOtherThreadConservatively(ConservativeSet& conserva
     size_t regSize = getPlatformThreadRegisters(thread->platformThread, regs);
 
     // mark the thread's registers
-    markConservatively(conservativeSet, static_cast<void*>(&regs), static_cast<void*>(reinterpret_cast<char*>(&regs) + regSize));
+    conservativeSet.add(static_cast<void*>(&regs), static_cast<void*>(reinterpret_cast<char*>(&regs) + regSize));
 
     void* stackPointer = otherThreadStackPointer(regs);
     void* stackBase = thread->stackBase;
     swapIfBackwards(stackPointer, stackBase);
-    markConservatively(conservativeSet, stackPointer, stackBase);
+    conservativeSet.add(stackPointer, stackBase);
 
     resumeThread(thread->platformThread);
 }
@@ -414,23 +415,4 @@ void MachineStackMarker::markMachineStackConservatively(ConservativeSet& conserv
 #endif
 }
 
-inline bool isPointerAligned(void* p)
-{
-    return !((intptr_t)(p) & (sizeof(char*) - 1));
-}
-
-void MachineStackMarker::markConservatively(ConservativeSet& conservativeSet, void* start, void* end)
-{
-    ASSERT(start <= end);
-    ASSERT((static_cast<char*>(end) - static_cast<char*>(start)) < 0x1000000);
-    ASSERT(isPointerAligned(start));
-    ASSERT(isPointerAligned(end));
-
-    for (char** it = static_cast<char**>(start); it != static_cast<char**>(end); ++it) {
-        if (!m_heap->contains(*it))
-            continue;
-        conservativeSet.add(reinterpret_cast<JSCell*>(*it));
-    }
-}
-
 } // namespace JSC
index a1f31737edaf076c18e33694c8cd0cc737289ca9..8afdb46736d1d5da8cac0032c7139968744786b3 100644 (file)
@@ -41,7 +41,6 @@ namespace JSC {
         ~MachineStackMarker();
 
         void markMachineStackConservatively(ConservativeSet&);
-        void markConservatively(ConservativeSet&, void* start, void* end);
 
 #if ENABLE(JSC_MULTIPLE_THREADS)
         void makeUsableFromMultipleThreads();
index 58dfa4c72c7ab71d641efca38b7316de9084113a..c3cb4f2d72a84dfd655dcc98be54a765ee5889e5 100644 (file)
@@ -188,18 +188,6 @@ namespace JSC {
 #endif
     };
     
-    class ConservativeSet {
-    public:
-        void add(JSCell* cell) { m_vector.append(cell); }
-        void mark(MarkStack& markStack)
-        {
-            for (size_t i = 0; i < m_vector.size(); ++i)
-                markStack.append(m_vector[i]);
-        }
-
-    private:
-        Vector<JSCell*, 64> m_vector;
-    };
 }
 
 #endif