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

Unified Diff: src/incremental-marking.cc

Issue 7032005: Unify markbits for old and new spaces. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
Patch Set: Created 9 years, 7 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
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index c3fc2fb3bf318dd2432af945ea4f319e7fa02232..814091acdcc4b50158d0eb18d00e84c365776502 100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -205,6 +205,7 @@ void IncrementalMarking::ClearMarkbits() {
ClearMarkbits(heap_->cell_space());
ClearMarkbits(heap_->map_space());
ClearMarkbits(heap_->code_space());
+ heap_->new_space()->ActivePage()->markbits()->Clear();
SetNewSpacePageFlags(heap_->new_space()->ActivePage(), true);
@@ -233,6 +234,7 @@ void IncrementalMarking::VerifyMarkbitsAreClean() {
VerifyMarkbitsAreClean(heap_->code_space());
VerifyMarkbitsAreClean(heap_->cell_space());
VerifyMarkbitsAreClean(heap_->map_space());
+ ASSERT(heap_->new_space()->ActivePage()->markbits()->IsClean());
}
#endif
@@ -327,11 +329,6 @@ void IncrementalMarking::StartMarking() {
addr + marking_deque_memory->size());
// Clear markbits.
- Address new_space_low = heap_->new_space()->ToSpaceLow();
- Address new_space_high = heap_->new_space()->ToSpaceHigh();
- heap_->marking()->ClearRange(
- new_space_low, static_cast<int>(new_space_high - new_space_low));
-
ClearMarkbits();
#ifdef DEBUG
@@ -351,11 +348,7 @@ void IncrementalMarking::StartMarking() {
void IncrementalMarking::PrepareForScavenge() {
if (!IsMarking()) return;
-
- Address new_space_low = heap_->new_space()->FromSpaceLow();
- Address new_space_high = heap_->new_space()->FromSpaceHigh();
- heap_->marking()->ClearRange(
- new_space_low, static_cast<int>(new_space_high - new_space_low));
+ heap_->new_space()->InactivePage()->markbits()->Clear();
}
@@ -502,7 +495,7 @@ void IncrementalMarking::Step(intptr_t allocated_bytes) {
ASSERT(IsGrey(marking->MarkBitFrom(obj)));
int size = obj->SizeFromMap(map);
bytes_to_process -= size;
- MarkBit map_mark_bit = marking->MarkBitFromOldSpace(map);
+ MarkBit map_mark_bit = marking->MarkBitFrom(map);
if (IsWhite(map_mark_bit)) WhiteToGreyAndPush(map, map_mark_bit);
// TODO(gc) switch to static visitor instead of normal visitor.
obj->IterateBody(map->instance_type(), size, &marking_visitor);
« no previous file with comments | « src/ia32/macro-assembler-ia32-inl.h ('k') | src/mark-compact.h » ('j') | src/serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698