[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
ggaren at apple.com
ggaren at apple.com
Sun Feb 20 23:38:50 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit c9bfff417b25221ce97dcde22452970c54e4c624
Author: ggaren at apple.com <ggaren at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Jan 22 20:11:22 2011 +0000
2011-01-22 Geoffrey Garen <ggaren at 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.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76454 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/Android.mk b/Source/JavaScriptCore/Android.mk
index 80c8b61..8c0b4c2 100644
--- a/Source/JavaScriptCore/Android.mk
+++ b/Source/JavaScriptCore/Android.mk
@@ -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 \
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt
index 674d272..31c7750 100644
--- a/Source/JavaScriptCore/CMakeLists.txt
+++ b/Source/JavaScriptCore/CMakeLists.txt
@@ -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
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index ab15dd7..26e2ed6 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,39 @@
+2011-01-22 Geoffrey Garen <ggaren at 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 at webkit.org>
Unreviewed WinCE build fix for r76430.
diff --git a/Source/JavaScriptCore/GNUmakefile.am b/Source/JavaScriptCore/GNUmakefile.am
index 7272471..4f0523f 100644
--- a/Source/JavaScriptCore/GNUmakefile.am
+++ b/Source/JavaScriptCore/GNUmakefile.am
@@ -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 \
diff --git a/Source/JavaScriptCore/JavaScriptCore.gypi b/Source/JavaScriptCore/JavaScriptCore.gypi
index 6ca18a0..daee7ef 100644
--- a/Source/JavaScriptCore/JavaScriptCore.gypi
+++ b/Source/JavaScriptCore/JavaScriptCore.gypi
@@ -280,6 +280,8 @@
'runtime/Lookup.h',
'runtime/MachineStackMarker.cpp',
'runtime/MachineStackMarker.h',
+ 'runtime/ConservativeSet.cpp',
+ 'runtime/ConservativeSet.h',
'runtime/MarkStack.cpp',
'runtime/MarkStack.h',
'runtime/MarkStackWin.cpp',
diff --git a/Source/JavaScriptCore/JavaScriptCore.pro b/Source/JavaScriptCore/JavaScriptCore.pro
index 9d254b7..ca31066 100644
--- a/Source/JavaScriptCore/JavaScriptCore.pro
+++ b/Source/JavaScriptCore/JavaScriptCore.pro
@@ -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 \
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
index 12310d8..fe3f439 100644
--- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
+++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj
@@ -1002,6 +1002,14 @@
>
</File>
<File
+ RelativePath="..\..\runtime\ConservativeSet.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\runtime\ConservativeSet.h"
+ >
+ </File>
+ <File
RelativePath="..\..\runtime\MarkStack.cpp"
>
</File>
diff --git a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
index 358e38c..473d48c 100644
--- a/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
+++ b/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
@@ -122,6 +122,7 @@
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, ); }; };
@@ -708,6 +709,7 @@
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>"; };
@@ -725,6 +727,7 @@
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>"; };
@@ -1708,6 +1711,8 @@
65EA73630BAE35D1001BB560 /* CommonIdentifiers.h */,
969A09220ED1E09C00F1F681 /* Completion.cpp */,
F5BB2BC5030F772101FCFE1D /* Completion.h */,
+ 146B14DB12EB5B12001BEC1B /* ConservativeSet.cpp */,
+ 149DAAF212EB559D0083B12B /* ConservativeSet.h */,
BCA62DFF0E2826310004F30D /* ConstructData.cpp */,
BC8F3CCF0DAF17BA00577A80 /* ConstructData.h */,
BCD203450E17135E002C7E82 /* DateConstructor.cpp */,
@@ -2711,6 +2716,7 @@
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 */,
@@ -2858,6 +2864,7 @@
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 */,
@@ -2878,7 +2885,6 @@
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
index 0000000..b276502
--- /dev/null
+++ b/Source/JavaScriptCore/runtime/ConservativeSet.cpp
@@ -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
index 0000000..9c70950
--- /dev/null
+++ b/Source/JavaScriptCore/runtime/ConservativeSet.h
@@ -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
diff --git a/Source/JavaScriptCore/runtime/Heap.cpp b/Source/JavaScriptCore/runtime/Heap.cpp
index 89f954b..9ec3799 100644
--- a/Source/JavaScriptCore/runtime/Heap.cpp
+++ b/Source/JavaScriptCore/runtime/Heap.cpp
@@ -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();
diff --git a/Source/JavaScriptCore/runtime/MachineStackMarker.cpp b/Source/JavaScriptCore/runtime/MachineStackMarker.cpp
index 79f9cc4..4430947 100644
--- a/Source/JavaScriptCore/runtime/MachineStackMarker.cpp
+++ b/Source/JavaScriptCore/runtime/MachineStackMarker.cpp
@@ -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*>(®s), static_cast<void*>(reinterpret_cast<char*>(®s) + regSize));
+ conservativeSet.add(static_cast<void*>(®s), static_cast<void*>(reinterpret_cast<char*>(®s) + 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
diff --git a/Source/JavaScriptCore/runtime/MachineStackMarker.h b/Source/JavaScriptCore/runtime/MachineStackMarker.h
index a1f3173..8afdb46 100644
--- a/Source/JavaScriptCore/runtime/MachineStackMarker.h
+++ b/Source/JavaScriptCore/runtime/MachineStackMarker.h
@@ -41,7 +41,6 @@ namespace JSC {
~MachineStackMarker();
void markMachineStackConservatively(ConservativeSet&);
- void markConservatively(ConservativeSet&, void* start, void* end);
#if ENABLE(JSC_MULTIPLE_THREADS)
void makeUsableFromMultipleThreads();
diff --git a/Source/JavaScriptCore/runtime/MarkStack.h b/Source/JavaScriptCore/runtime/MarkStack.h
index 58dfa4c..c3cb4f2 100644
--- a/Source/JavaScriptCore/runtime/MarkStack.h
+++ b/Source/JavaScriptCore/runtime/MarkStack.h
@@ -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
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list