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

Unified Diff: src/mark-compact.cc

Issue 17546005: Deprecate one virtual marking visitor for mark-compact GC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 c06bfd7f7323825d4c0f278c04e39260eaf3cc4f..54f1396d2c757c36aa9e5965919eca7fc5e5ed47 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -1713,23 +1713,6 @@ VisitorDispatchTable<MarkCompactMarkingVisitor::Callback>
MarkCompactMarkingVisitor::non_count_table_;
-class MarkingVisitor : public ObjectVisitor {
- public:
- explicit MarkingVisitor(Heap* heap) : heap_(heap) { }
-
- void VisitPointer(Object** p) {
- MarkCompactMarkingVisitor::VisitPointer(heap_, p);
- }
-
- void VisitPointers(Object** start, Object** end) {
- MarkCompactMarkingVisitor::VisitPointers(heap_, start, end);
- }
-
- private:
- Heap* heap_;
-};
-
-
class CodeMarkingVisitor : public ThreadVisitor {
public:
explicit CodeMarkingVisitor(MarkCompactCollector* collector)
@@ -2038,14 +2021,13 @@ bool MarkCompactCollector::IsUnmarkedHeapObjectWithHeap(Heap* heap,
}
-void MarkCompactCollector::MarkStringTable() {
+void MarkCompactCollector::MarkStringTable(RootMarkingVisitor* visitor) {
StringTable* string_table = heap()->string_table();
// Mark the string table itself.
MarkBit string_table_mark = Marking::MarkBitFrom(string_table);
SetMark(string_table, string_table_mark);
// Explicitly mark the prefix.
- MarkingVisitor marker(heap());
- string_table->IteratePrefix(&marker);
+ string_table->IteratePrefix(visitor);
ProcessMarkingDeque();
}
@@ -2056,7 +2038,7 @@ void MarkCompactCollector::MarkRoots(RootMarkingVisitor* visitor) {
heap()->IterateStrongRoots(visitor, VISIT_ONLY_STRONG);
// Handle the string table specially.
- MarkStringTable();
+ MarkStringTable(visitor);
// There may be overflowed objects in the heap. Visit them now.
while (marking_deque_.overflowed()) {
@@ -3291,11 +3273,9 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
bool code_slots_filtering_required;
{ GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_SWEEP_NEWSPACE);
code_slots_filtering_required = MarkInvalidatedCode();
-
EvacuateNewSpace();
}
-
{ GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_EVACUATE_PAGES);
EvacuatePages();
}
« 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