Ignore:
Timestamp:
Jan 29, 2011, 10:23:13 PM (15 years ago)
Author:
[email protected]
Message:

2011-01-29 Geoffrey Garen <[email protected]>

Reviewed by Cameron Zwarich.

Simplified Heap iteration
https://bugs.webkit.org/show_bug.cgi?id=53393

  • runtime/CollectorHeapIterator.h: (JSC::CollectorHeapIterator::isValid): (JSC::CollectorHeapIterator::isLive): (JSC::CollectorHeapIterator::advance): Removed "max" argument to advance because it's a constant. (JSC::LiveObjectIterator::LiveObjectIterator): (JSC::LiveObjectIterator::operator++): (JSC::DeadObjectIterator::DeadObjectIterator): (JSC::DeadObjectIterator::operator++): (JSC::ObjectIterator::ObjectIterator): (JSC::ObjectIterator::operator++): Factored out common checks into two helper functions -- isValid() for "Am I past the end?" and isLive() for "Is the cell I'm pointing to live?".
  • runtime/MarkedSpace.cpp: (JSC::MarkedSpace::freeBlock): (JSC::MarkedSpace::sweep): Always sweep from the beginning of the heap to the end, to avoid making sweep subtly reliant on internal Heap state. (JSC::MarkedSpace::primaryHeapBegin): (JSC::MarkedSpace::primaryHeapEnd): Always be explicit about where iteration begins.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r77081 r77082  
     12011-01-29  Geoffrey Garen  <[email protected]>
     2
     3        Reviewed by Cameron Zwarich.
     4
     5        Simplified Heap iteration
     6        https://bugs.webkit.org/show_bug.cgi?id=53393
     7
     8        * runtime/CollectorHeapIterator.h:
     9        (JSC::CollectorHeapIterator::isValid):
     10        (JSC::CollectorHeapIterator::isLive):
     11        (JSC::CollectorHeapIterator::advance): Removed "max" argument to
     12        advance because it's a constant.
     13        (JSC::LiveObjectIterator::LiveObjectIterator):
     14        (JSC::LiveObjectIterator::operator++):
     15        (JSC::DeadObjectIterator::DeadObjectIterator):
     16        (JSC::DeadObjectIterator::operator++):
     17        (JSC::ObjectIterator::ObjectIterator):
     18        (JSC::ObjectIterator::operator++): Factored out common checks into
     19        two helper functions -- isValid() for "Am I past the end?" and isLive()
     20        for "Is the cell I'm pointing to live?".
     21
     22        * runtime/MarkedSpace.cpp:
     23        (JSC::MarkedSpace::freeBlock):
     24        (JSC::MarkedSpace::sweep): Always sweep from the beginning of the heap
     25        to the end, to avoid making sweep subtly reliant on internal Heap state.
     26        (JSC::MarkedSpace::primaryHeapBegin):
     27        (JSC::MarkedSpace::primaryHeapEnd): Always be explicit about where
     28        iteration begins.
     29
    1302011-01-29  Geoffrey Garen  <[email protected]>
    231
Note: See TracChangeset for help on using the changeset viewer.