Changeset 120149 in webkit for trunk/Source/JavaScriptCore/heap/MarkStack.h
- Timestamp:
- Jun 12, 2012, 7:06:50 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/heap/MarkStack.h
r119633 r120149 29 29 #include "CopiedSpace.h" 30 30 #include "HandleTypes.h" 31 #include "JSValue.h" 31 32 #include "Options.h" 32 #include "JSValue.h"33 33 #include "Register.h" 34 34 #include "UnconditionalFinalizer.h" … … 39 39 #include <wtf/HashMap.h> 40 40 #include <wtf/HashSet.h> 41 #include <wtf/Vector.h>42 41 #include <wtf/Noncopyable.h> 43 42 #include <wtf/OSAllocator.h> 44 43 #include <wtf/PageBlock.h> 44 #include <wtf/TCSpinLock.h> 45 45 #include <wtf/text/StringHash.h> 46 #include <wtf/Vector.h> 46 47 47 48 #if ENABLE(OBJECT_MARK_LOGGING) … … 113 114 114 115 private: 115 Mutexm_lock;116 SpinLock m_lock; 116 117 MarkStackSegment* m_nextFreeSegment; 117 118 }; … … 130 131 bool isEmpty(); 131 132 132 bool canDonateSomeCells(); // Returns false if you should definitely not call doanteSomeCellsTo(). 133 bool donateSomeCellsTo(MarkStackArray& other); // Returns true if some cells were donated. 134 135 void stealSomeCellsFrom(MarkStackArray& other); 133 void donateSomeCellsTo(MarkStackArray& other); 134 135 void stealSomeCellsFrom(MarkStackArray& other, size_t idleThreadCount); 136 136 137 137 size_t size(); … … 415 415 } 416 416 417 inline bool MarkStackArray::canDonateSomeCells()418 {419 size_t numberOfCellsToKeep = Options::minimumNumberOfCellsToKeep;420 // Another check: see if we have enough cells to warrant donation.421 if (m_top <= numberOfCellsToKeep) {422 // This indicates that we might not want to donate anything; check if we have423 // another full segment. If not, then don't donate.424 if (!m_topSegment->m_previous)425 return false;426 427 ASSERT(m_topSegment->m_previous->m_top == m_segmentCapacity);428 }429 430 return true;431 }432 433 417 inline size_t MarkStackArray::size() 434 418 {
Note:
See TracChangeset
for help on using the changeset viewer.