diff options
Diffstat (limited to 'Source/JavaScriptCore/heap/Heap.h')
-rw-r--r-- | Source/JavaScriptCore/heap/Heap.h | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/JavaScriptCore/heap/Heap.h b/Source/JavaScriptCore/heap/Heap.h index 6bf82e4a5..edfd91483 100644 --- a/Source/JavaScriptCore/heap/Heap.h +++ b/Source/JavaScriptCore/heap/Heap.h @@ -32,7 +32,6 @@ #include "MarkedSpace.h" #include "SlotVisitor.h" #include "WeakHandleOwner.h" -#include "WeakSet.h" #include "WriteBarrierSupport.h" #include <wtf/HashCountedSet.h> #include <wtf/HashSet.h> @@ -65,8 +64,7 @@ namespace JSC { enum OperationInProgress { NoOperation, Allocation, Collection }; - // Heap size hint. - enum HeapSize { SmallHeap, LargeHeap }; + enum HeapType { SmallHeap, LargeHeap }; class Heap { WTF_MAKE_NONCOPYABLE(Heap); @@ -90,7 +88,7 @@ namespace JSC { static void writeBarrier(const JSCell*, JSCell*); static uint8_t* addressOfCardFor(JSCell*); - Heap(JSGlobalData*, HeapSize); + Heap(JSGlobalData*, HeapType); ~Heap(); JS_EXPORT_PRIVATE void lastChanceToFinalize(); @@ -144,12 +142,11 @@ namespace JSC { void pushTempSortVector(Vector<ValueStringPair>*); void popTempSortVector(Vector<ValueStringPair>*); - HashSet<MarkedArgumentBuffer*>& markListSet() { if (!m_markListSet) m_markListSet = new HashSet<MarkedArgumentBuffer*>; return *m_markListSet; } + HashSet<MarkedArgumentBuffer*>& markListSet() { if (!m_markListSet) m_markListSet = adoptPtr(new HashSet<MarkedArgumentBuffer*>); return *m_markListSet; } template<typename Functor> typename Functor::ReturnType forEachProtectedCell(Functor&); template<typename Functor> typename Functor::ReturnType forEachProtectedCell(); - WeakSet* weakSet() { return &m_weakSet; } HandleSet* handleSet() { return &m_handleSet; } HandleStack* handleStack() { return &m_handleStack; } @@ -197,7 +194,8 @@ namespace JSC { RegisterFile& registerFile(); BlockAllocator& blockAllocator(); - const HeapSize m_heapSize; + const HeapType m_heapType; + const size_t m_ramSize; const size_t m_minBytesPerCycle; size_t m_sizeAfterLastCollect; @@ -206,18 +204,17 @@ namespace JSC { size_t m_bytesAbandoned; OperationInProgress m_operationInProgress; + BlockAllocator m_blockAllocator; MarkedSpace m_objectSpace; CopiedSpace m_storageSpace; - BlockAllocator m_blockAllocator; - #if ENABLE(SIMPLE_HEAP_PROFILING) VTableSpectrum m_destroyedTypeCounts; #endif ProtectCountSet m_protectedValues; Vector<Vector<ValueStringPair>* > m_tempSortingVectors; - HashSet<MarkedArgumentBuffer*>* m_markListSet; + OwnPtr<HashSet<MarkedArgumentBuffer*> > m_markListSet; OwnPtr<GCActivityCallback> m_activityCallback; @@ -226,7 +223,6 @@ namespace JSC { MarkStackThreadSharedData m_sharedData; SlotVisitor m_slotVisitor; - WeakSet m_weakSet; HandleSet m_handleSet; HandleStack m_handleStack; DFGCodeBlocks m_dfgCodeBlocks; |