Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(40)

Side by Side Diff: src/heap/spaces.cc

Issue 2531093002: [heap] Replace NewSpacePageRange with PageRange (Closed)
Patch Set: Fix missed replace Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/spaces.h ('k') | src/heap/spaces-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/spaces.h" 5 #include "src/heap/spaces.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 2077 matching lines...) Expand 10 before | Expand all | Expand 10 after
2088 std::swap(from->current_page_, to->current_page_); 2088 std::swap(from->current_page_, to->current_page_);
2089 2089
2090 to->FixPagesFlags(saved_to_space_flags, Page::kCopyOnFlipFlagsMask); 2090 to->FixPagesFlags(saved_to_space_flags, Page::kCopyOnFlipFlagsMask);
2091 from->FixPagesFlags(0, 0); 2091 from->FixPagesFlags(0, 0);
2092 } 2092 }
2093 2093
2094 void SemiSpace::set_age_mark(Address mark) { 2094 void SemiSpace::set_age_mark(Address mark) {
2095 DCHECK_EQ(Page::FromAllocationAreaAddress(mark)->owner(), this); 2095 DCHECK_EQ(Page::FromAllocationAreaAddress(mark)->owner(), this);
2096 age_mark_ = mark; 2096 age_mark_ = mark;
2097 // Mark all pages up to the one containing mark. 2097 // Mark all pages up to the one containing mark.
2098 for (Page* p : NewSpacePageRange(space_start(), mark)) { 2098 for (Page* p : PageRange(space_start(), mark)) {
2099 p->SetFlag(MemoryChunk::NEW_SPACE_BELOW_AGE_MARK); 2099 p->SetFlag(MemoryChunk::NEW_SPACE_BELOW_AGE_MARK);
2100 } 2100 }
2101 } 2101 }
2102 2102
2103 std::unique_ptr<ObjectIterator> SemiSpace::GetObjectIterator() { 2103 std::unique_ptr<ObjectIterator> SemiSpace::GetObjectIterator() {
2104 // Use the NewSpace::NewObjectIterator to iterate the ToSpace. 2104 // Use the NewSpace::NewObjectIterator to iterate the ToSpace.
2105 UNREACHABLE(); 2105 UNREACHABLE();
2106 return std::unique_ptr<ObjectIterator>(); 2106 return std::unique_ptr<ObjectIterator>();
2107 } 2107 }
2108 2108
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
3247 object->ShortPrint(); 3247 object->ShortPrint();
3248 PrintF("\n"); 3248 PrintF("\n");
3249 } 3249 }
3250 printf(" --------------------------------------\n"); 3250 printf(" --------------------------------------\n");
3251 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3251 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3252 } 3252 }
3253 3253
3254 #endif // DEBUG 3254 #endif // DEBUG
3255 } // namespace internal 3255 } // namespace internal
3256 } // namespace v8 3256 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/spaces.h ('k') | src/heap/spaces-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698