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

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

Issue 1470253002: [heap] Refactor evacuation for young and old gen into visitors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: don't check for WAS_SWEPT, as we never sweep newspace pages Created 5 years, 1 month 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 | « no previous file | 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 e6723fd70e030d726938337d4294a0d20898d262..05cebe1dfcbd42d9d636a37a87426121326d695e 100644
--- a/src/heap/mark-compact.h
+++ b/src/heap/mark-compact.h
@@ -327,6 +327,15 @@ class ThreadLocalTop;
// Mark-Compact collector
class MarkCompactCollector {
public:
+ enum IterationMode {
+ kKeepMarking,
+ kClearMarkbits,
+ };
+
+ class EvacuateNewSpaceVisitor;
+ class EvacuateOldSpaceVisitor;
+ class HeapObjectVisitor;
+
static void Initialize();
void SetUp();
@@ -703,14 +712,13 @@ class MarkCompactCollector {
// regions to each space's free list.
void SweepSpaces();
- int DiscoverAndEvacuateBlackObjectsOnPage(NewSpace* new_space,
- NewSpacePage* p);
+ // Iterates through all live objects on a page using marking information.
+ // Returns whether all objects have successfully been visited.
+ bool IterateLiveObjectsOnPage(MemoryChunk* page, HeapObjectVisitor* visitor,
+ IterationMode mode);
void EvacuateNewSpace();
- bool EvacuateLiveObjectsFromPage(Page* p, PagedSpace* target_space,
- SlotsBuffer** evacuation_slots_buffer);
-
void AddEvacuationSlotsBufferSynchronized(
SlotsBuffer* evacuation_slots_buffer);
« no previous file with comments | « no previous file | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698