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

Unified Diff: src/heap/mark-compact.h

Issue 2185613002: [heap] Reland "Remove black pages and use black areas instead." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: move check to left trimming Created 4 years, 5 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.h
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
index 6a238839b18eb55d6139f1d83cc159a85343532c..01170333d7bc6b421e4a294d7d278b5a72cbaa74 100644
--- a/src/heap/mark-compact.h
+++ b/src/heap/mark-compact.h
@@ -218,7 +218,19 @@ class MarkBitCellIterator BASE_EMBEDDED {
inline void Advance() {
cell_index_++;
- cell_base_ += 32 * kPointerSize;
+ cell_base_ += Bitmap::kBitsPerCell * kPointerSize;
+ }
+
+ inline bool Advance(unsigned int new_cell_index) {
+ if (new_cell_index != cell_index_) {
+ DCHECK_GT(new_cell_index, cell_index_);
+ DCHECK_LE(new_cell_index, last_cell_index_);
+ unsigned int diff = new_cell_index - cell_index_;
+ cell_index_ = new_cell_index;
+ cell_base_ += diff * (Bitmap::kBitsPerCell * kPointerSize);
+ return true;
+ }
+ return false;
}
// Return the next mark bit cell. If there is no next it returns 0;
@@ -253,8 +265,6 @@ class LiveObjectIterator BASE_EMBEDDED {
it_(chunk_),
cell_base_(it_.CurrentCellBase()),
current_cell_(*it_.CurrentCell()) {
- // Black pages can not be iterated.
- DCHECK(!chunk->IsFlagSet(Page::BLACK_PAGE));
}
HeapObject* Next();
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698