Changeset 53459 in webkit for trunk/JavaScriptCore/runtime/Collector.cpp
- Timestamp:
- Jan 19, 2010, 12:25:22 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/Collector.cpp
r53455 r53459 187 187 return; 188 188 189 ASSERT(!m_globalData->dynamicGlobalObject);190 ASSERT(!isBusy());191 192 189 // The global object is not GC protected at this point, so sweeping may delete it 193 190 // (and thus the global data) before other objects that may use the global data. … … 294 291 NEVER_INLINE void Heap::freeBlock(size_t block) 295 292 { 296 m_heap.didShrink = true;297 298 293 ObjectIterator it(m_heap, block); 299 294 ObjectIterator end(m_heap, block + 1); … … 335 330 void Heap::freeBlocks() 336 331 { 337 ProtectCountSet protectedValuesCopy = m_protectedValues; 338 339 clearMarkBits(); 340 markProtectedObjects(m_globalData->markStack); 341 342 m_heap.nextCell = 0; 343 m_heap.nextBlock = 0; 344 DeadObjectIterator it(m_heap, m_heap.nextBlock, m_heap.nextCell); 345 DeadObjectIterator end(m_heap, m_heap.usedBlocks); 346 for ( ; it != end; ++it) 347 (*it)->~JSCell(); 348 349 ASSERT(!protectedObjectCount()); 350 351 ProtectCountSet::iterator protectedValuesEnd = protectedValuesCopy.end(); 352 for (ProtectCountSet::iterator protectedValuesIt = protectedValuesCopy.begin(); protectedValuesIt != protectedValuesEnd; ++protectedValuesIt) 353 protectedValuesIt->first->~JSCell(); 354 355 for (size_t block = 0; block < m_heap.usedBlocks; ++block) 356 freeBlockPtr(m_heap.blocks[block]); 357 332 while (m_heap.usedBlocks) 333 freeBlock(0); 358 334 fastFree(m_heap.blocks); 359 360 335 memset(&m_heap, 0, sizeof(CollectorHeap)); 361 336 } … … 466 441 if (m_heap.blocks[i]->marked.isEmpty()) { 467 442 freeBlock(i); 443 m_heap.didShrink = true; 468 444 } else 469 445 ++i;
Note:
See TracChangeset
for help on using the changeset viewer.