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

Unified Diff: src/mark-compact.cc

Issue 8342037: Switch UnreachableObjectsFilter to use Marking instead of InstrusiveMarking. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: simplify Created 9 years, 2 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/mark-compact.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index 9fa79ca74629a406ea6a27181bfa296c23f47cee..0abc5695b46d0b8e2b5a480d0db4e77d7fb6e5f1 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -330,7 +330,7 @@ void MarkCompactCollector::VerifyMarkbitsAreClean() {
#endif
-static void ClearMarkbits(PagedSpace* space) {
+static void ClearMarkbitsInPagedSpace(PagedSpace* space) {
PageIterator it(space);
while (it.has_next()) {
@@ -339,7 +339,7 @@ static void ClearMarkbits(PagedSpace* space) {
}
-static void ClearMarkbits(NewSpace* space) {
+static void ClearMarkbitsInNewSpace(NewSpace* space) {
NewSpacePageIterator it(space->ToSpaceStart(), space->ToSpaceEnd());
while (it.has_next()) {
@@ -348,15 +348,15 @@ static void ClearMarkbits(NewSpace* space) {
}
-static void ClearMarkbits(Heap* heap) {
- ClearMarkbits(heap->code_space());
- ClearMarkbits(heap->map_space());
- ClearMarkbits(heap->old_pointer_space());
- ClearMarkbits(heap->old_data_space());
- ClearMarkbits(heap->cell_space());
- ClearMarkbits(heap->new_space());
+void MarkCompactCollector::ClearMarkbits() {
+ ClearMarkbitsInPagedSpace(heap_->code_space());
+ ClearMarkbitsInPagedSpace(heap_->map_space());
+ ClearMarkbitsInPagedSpace(heap_->old_pointer_space());
+ ClearMarkbitsInPagedSpace(heap_->old_data_space());
+ ClearMarkbitsInPagedSpace(heap_->cell_space());
+ ClearMarkbitsInNewSpace(heap_->new_space());
- LargeObjectIterator it(heap->lo_space());
+ LargeObjectIterator it(heap_->lo_space());
for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) {
MarkBit mark_bit = Marking::MarkBitFrom(obj);
mark_bit.Clear();
@@ -504,7 +504,7 @@ void MarkCompactCollector::Prepare(GCTracer* tracer) {
// Clear marking bits for precise sweeping to collect all garbage.
if (was_marked_incrementally_ && PreciseSweepingRequired()) {
heap()->incremental_marking()->Abort();
- ClearMarkbits(heap_);
+ ClearMarkbits();
AbortCompaction();
was_marked_incrementally_ = false;
}
« no previous file with comments | « src/mark-compact.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698