| 
    
      
  | 
  
 Chromium Code Reviews| 
         Created: 
          4 years, 6 months ago by Michael Lippautz Modified: 
          
          
          4 years, 6 months ago CC: 
          
          
          Hannes Payer (out of office), ulan, v8-reviews_googlegroups.com Base URL: 
          
          
          https://chromium.googlesource.com/v8/v8.git@master Target Ref: 
          
          
          refs/pending/heads/master Project: 
          
          v8 Visibility: 
          
          
          
        Public.  | 
      
        
  Description[heap] Modernize all *Page iterators to be proper C++ iterators
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
Committed: https://crrev.com/4244b989ca7ec6a0889509577af3e7931b4dd6ab
Cr-Commit-Position: refs/heads/master@{#37210}
   
  Patch Set 1 #Patch Set 2 : Unify w/ NewSpacePageIterator #Patch Set 3 : Unify w/ LargePageIterator #
 Messages
    Total messages: 37 (28 generated)
     
  
  
 Patchset #1 (id:1) has been deleted 
 Description was changed from
==========
[heap] Revamp PageIterator
BUG=
==========
to
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
for (auto begin = space->begin(); begin != space->end(); ++it) {
}
  or
for (Page* p : *space) {
}
BUG=
==========
          
 Description was changed from
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
for (auto begin = space->begin(); begin != space->end(); ++it) {
}
  or
for (Page* p : *space) {
}
BUG=
==========
to
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
- for (auto begin = space->begin(); begin != space->end(); ++it) {}
- for (Page* p : *space) {}
BUG=
==========
          
 Description was changed from
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
for (auto begin = space->begin(); begin != space->end(); ++it) {
}
  or
for (Page* p : *space) {
}
BUG=
==========
to
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
- for (auto begin = space->begin(); begin != space->end(); ++it) {}
- for (Page* p : *space) {}
BUG=
==========
          
 Description was changed from
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
- for (auto begin = space->begin(); begin != space->end(); ++it) {}
- for (Page* p : *space) {}
BUG=
==========
to
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
BUG=
==========
          
 Description was changed from
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
BUG=
==========
to
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting deletion:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    // p can be deleted
  }
BUG=
==========
          
 Description was changed from
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting deletion:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    // p can be deleted
  }
BUG=
==========
to
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking of a Page:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    // p can be deleted
  }
BUG=
==========
          
 Description was changed from
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking of a Page:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    // p can be deleted
  }
BUG=
==========
to
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking of a Page:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
BUG=
==========
          
 Description was changed from
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking of a Page:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
BUG=
==========
to
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking/freeing of a Page:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
BUG=
==========
          
 Description was changed from
==========
[heap] Revamp PageIterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking/freeing of a Page:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
BUG=
==========
to
==========
[heap] Make (Large)Page a C++ iterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking/freeing of a Page:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
BUG=
==========
          
 Description was changed from
==========
[heap] Make (Large)Page a C++ iterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking/freeing of a Page:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
BUG=
==========
to
==========
[heap] Make (Large)Page a C++ iterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking/freeing of a Page:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=
==========
          
 Patchset #1 (id:20001) has been deleted 
 Description was changed from
==========
[heap] Make (Large)Page a C++ iterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking/freeing of a Page:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=
==========
to
==========
[heap] Make (Large)Page a C++ iterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking/freeing of a Page:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=chromium:581412
LOG=N
==========
          
 Description was changed from
==========
[heap] Make (Large)Page a C++ iterator
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking/freeing of a Page:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=chromium:581412
LOG=N
==========
to
==========
[heap] Make all *Page iterators proper C++ iterators
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking/freeing of a Page:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=chromium:581412
LOG=N
==========
          
 The CQ bit was checked by mlippautz@chromium.org to run a CQ dry run 
 Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2088223002/80001 
 Description was changed from
==========
[heap] Make all *Page iterators proper C++ iterators
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking/freeing of a Page:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=chromium:581412
LOG=N
==========
to
==========
[heap] Make all *Page iterators proper C++ iterators
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking/freeing of a Page on the fly:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=chromium:581412
LOG=N
==========
          
 Description was changed from
==========
[heap] Make all *Page iterators proper C++ iterators
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking/freeing of a Page on the fly:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=chromium:581412
LOG=N
==========
to
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking/freeing of a Page on the fly:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=chromium:581412
LOG=N
==========
          
 Description was changed from
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
Works now like the regular C++ iterator
- for (auto it = space->begin(); it != space->end(); ++it) {}
- for (Page* p : *space) {}
Loop supporting unlinking/freeing of a Page on the fly:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=chromium:581412
LOG=N
==========
to
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
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) {}
Loop supporting unlinking/freeing of a Page on the fly:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=chromium:581412
LOG=N
==========
          
 Description was changed from
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
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) {}
Loop supporting unlinking/freeing of a Page on the fly:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=chromium:581412
LOG=N
==========
to
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
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) {}
Loop supporting unlinking/freeing of a Page on the fly:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=chromium:581412
LOG=N
==========
          
 Description was changed from
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
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) {}
Loop supporting unlinking/freeing of a Page on the fly:
  for (auto it = space->begin(); != space->end();) {
    Page* p = *(it++);
    p->Unlink();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=chromium:581412
LOG=N
==========
to
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
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();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=chromium:581412
LOG=N
==========
          
 Description was changed from
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
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();
  }
On the way:
- NewSpace is already composed of |Page|s, so get rid of the separate iterator.
- Templatize the implementation to also apply for LargeObjectSpace.
BUG=chromium:581412
LOG=N
==========
to
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
All page iterators are now unified, i.e., iterating over of a space works
the same for all spaces (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();
  }
BUG=chromium:581412
LOG=N
==========
          
 Description was changed from
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
All page iterators are now unified, i.e., iterating over of a space works
the same for all spaces (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();
  }
BUG=chromium:581412
LOG=N
==========
to
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
All page iterators are now unified, i.e., iterating over of a space works
the same for all spaces (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
==========
          
 The CQ bit was unchecked by commit-bot@chromium.org 
 Dry run: This issue passed the CQ dry run. 
 Description was changed from
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
All page iterators are now unified, i.e., iterating over of a space works
the same for all spaces (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
==========
to
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
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
==========
          
 mlippautz@chromium.org changed reviewers: + jochen@chromium.org 
 wdyt? 
 wdyt? 
 yay, lgtm 
 On 2016/06/23 09:09:47, Michael Lippautz wrote: > wdyt? src/snapshot lgtm. 
 The CQ bit was checked by mlippautz@chromium.org 
 CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2088223002/80001 
 
            
              
                Message was sent while issue was closed.
              
            
             
          
        Description was changed from
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
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
==========
to
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
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
==========
          
 
            
              
                Message was sent while issue was closed.
              
            
             
          
        Committed patchset #3 (id:80001) 
 
            
              
                Message was sent while issue was closed.
              
            
             
          
        Description was changed from
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
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
==========
to
==========
[heap] Modernize all *Page iterators to be proper C++ iterators
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
Committed: https://crrev.com/4244b989ca7ec6a0889509577af3e7931b4dd6ab
Cr-Commit-Position: refs/heads/master@{#37210}
==========
          
 
            
              
                Message was sent while issue was closed.
              
            
             
          
        Patchset 3 (id:??) landed as https://crrev.com/4244b989ca7ec6a0889509577af3e7931b4dd6ab Cr-Commit-Position: refs/heads/master@{#37210}  | 
    |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
