• mlippautz's avatar
    [heap] Modernize all *Page iterators to be proper C++ iterators · 4244b989
    mlippautz authored
    As part of the page type unification also unify page iterators. Iterating
    over a space works the same for all spaces now (new, old, lo).
    
    Iterating over pages of a space follows now the regular C++ iterator pattern:
    - for (auto it = space->begin(); it != space->end(); ++it) {}
    - for (Page* p : *space) {}
    
    GC only: Loop supporting unlinking/freeing of a Page on the fly:
      for (auto it = space->begin(); != space->end();) {
        Page* p = *(it++);
        p->Unlink();
      }
    
    For iteration of a range of new space pages use NewSpacePageRange which
    also verifies that the range is actually a proper new space page range.
    
    BUG=chromium:581412
    LOG=N
    
    Review-Url: https://codereview.chromium.org/2088223002
    Cr-Commit-Position: refs/heads/master@{#37210}
    4244b989
heap-utils.cc 5.54 KB