Index: test/cctest/test-spaces.cc |
diff --git a/test/cctest/test-spaces.cc b/test/cctest/test-spaces.cc |
index 3ee0e4e8cd9c53b61c221700801e099ee307eb9e..2811ee6c72f630adea72e11a14460fed88a311d6 100644 |
--- a/test/cctest/test-spaces.cc |
+++ b/test/cctest/test-spaces.cc |
@@ -32,40 +32,32 @@ |
using namespace v8::internal; |
-static void VerifyRSet(Address page_start) { |
-#ifdef DEBUG |
- Page::set_rset_state(Page::IN_USE); |
-#endif |
- |
+static void VerifyRegionMarking(Address page_start) { |
Page* p = Page::FromAddress(page_start); |
- p->ClearRSet(); |
+ p->SetRegionMarks(Page::kAllRegionsCleanMarks); |
for (Address addr = p->ObjectAreaStart(); |
addr < p->ObjectAreaEnd(); |
addr += kPointerSize) { |
- CHECK(!Page::IsRSetSet(addr, 0)); |
+ CHECK(!Page::FromAddress(addr)->IsRegionDirty(addr)); |
} |
for (Address addr = p->ObjectAreaStart(); |
addr < p->ObjectAreaEnd(); |
addr += kPointerSize) { |
- Page::SetRSet(addr, 0); |
+ Page::FromAddress(addr)->MarkRegionDirty(addr); |
} |
for (Address addr = p->ObjectAreaStart(); |
addr < p->ObjectAreaEnd(); |
addr += kPointerSize) { |
- CHECK(Page::IsRSetSet(addr, 0)); |
+ CHECK(Page::FromAddress(addr)->IsRegionDirty(addr)); |
} |
} |
TEST(Page) { |
-#ifdef DEBUG |
- Page::set_rset_state(Page::NOT_IN_USE); |
-#endif |
- |
byte* mem = NewArray<byte>(2*Page::kPageSize); |
CHECK(mem != NULL); |
@@ -90,8 +82,8 @@ TEST(Page) { |
CHECK(p->OffsetToAddress(Page::kObjectStartOffset) == p->ObjectAreaStart()); |
CHECK(p->OffsetToAddress(Page::kPageSize) == p->ObjectAreaEnd()); |
- // test remember set |
- VerifyRSet(page_start); |
+ // test region marking |
+ VerifyRegionMarking(page_start); |
DeleteArray(mem); |
} |