diff options
Diffstat (limited to 'JavaScriptCore/runtime/Collector.h')
-rw-r--r-- | JavaScriptCore/runtime/Collector.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/JavaScriptCore/runtime/Collector.h b/JavaScriptCore/runtime/Collector.h index 237c139..a4e2fe1 100644 --- a/JavaScriptCore/runtime/Collector.h +++ b/JavaScriptCore/runtime/Collector.h @@ -22,8 +22,8 @@ #ifndef Collector_h #define Collector_h -#include "AlignedMemoryAllocator.h" #include "GCHandle.h" +#include "JSValue.h" #include <stddef.h> #include <string.h> #include <wtf/Bitmap.h> @@ -33,6 +33,7 @@ #include <wtf/Noncopyable.h> #include <wtf/OwnPtr.h> #include <wtf/PageAllocation.h> +#include <wtf/PageAllocationAligned.h> #include <wtf/PassOwnPtr.h> #include <wtf/StdLibExtras.h> #include <wtf/Threading.h> @@ -63,13 +64,10 @@ namespace JSC { const size_t BLOCK_SIZE = 256 * 1024; // 256k #endif - typedef AlignedMemoryAllocator<BLOCK_SIZE> CollectorBlockAllocator; - typedef AlignedMemory<BLOCK_SIZE> AlignedCollectorBlock; - struct CollectorHeap { size_t nextBlock; size_t nextCell; - AlignedCollectorBlock* blocks; + PageAllocationAligned* blocks; void* nextNumber; @@ -98,6 +96,8 @@ namespace JSC { bool isBusy(); // true if an allocation or collection is in progress void collectAllGarbage(); + + GCActivityCallback* activityCallback(); void setActivityCallback(PassOwnPtr<GCActivityCallback>); static const size_t minExtraCost = 256; @@ -137,6 +137,9 @@ namespace JSC { void markConservatively(MarkStack&, void* start, void* end); + void pushTempSortVector(WTF::Vector<ValueStringPair>*); + void popTempSortVector(WTF::Vector<ValueStringPair>*); + HashSet<MarkedArgumentBuffer*>& markListSet() { if (!m_markListSet) m_markListSet = new HashSet<MarkedArgumentBuffer*>; return *m_markListSet; } JSGlobalData* globalData() const { return m_globalData; } @@ -171,6 +174,7 @@ namespace JSC { void markRoots(); void markProtectedObjects(MarkStack&); + void markTempSortVectors(MarkStack&); void markCurrentThreadConservatively(MarkStack&); void markCurrentThreadConservativelyInternal(MarkStack&); void markOtherThreadConservatively(MarkStack&, Thread*); @@ -184,7 +188,8 @@ namespace JSC { CollectorHeap m_heap; ProtectCountSet m_protectedValues; - WTF::Vector<AlignedMemory<WeakGCHandlePool::poolSize> > m_weakGCHandlePools; + WTF::Vector<PageAllocationAligned> m_weakGCHandlePools; + WTF::Vector<WTF::Vector<ValueStringPair>* > m_tempSortingVectors; HashSet<MarkedArgumentBuffer*>* m_markListSet; @@ -201,10 +206,6 @@ namespace JSC { pthread_key_t m_currentThreadRegistrar; #endif - // Allocates collector blocks with correct alignment - CollectorBlockAllocator m_blockallocator; - WeakGCHandlePool::Allocator m_weakGCHandlePoolAllocator; - JSGlobalData* m_globalData; }; |