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

Unified Diff: src/heap/scavenger.h

Issue 2801073006: Decouple root visitors from object visitors. (Closed)
Patch Set: rebase Created 3 years, 8 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/heap/object-stats.cc ('k') | src/heap/scavenger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/scavenger.h
diff --git a/src/heap/scavenger.h b/src/heap/scavenger.h
index 54fe6ffdf92f50b4a017bd4216b0005011b542a6..72e6a1f4743fa286769708e39fdf851adc13cfa5 100644
--- a/src/heap/scavenger.h
+++ b/src/heap/scavenger.h
@@ -44,16 +44,20 @@ class Scavenger {
VisitorDispatchTable<ScavengingCallback> scavenging_visitors_table_;
};
-
// Helper class for turning the scavenger into an object visitor that is also
// filtering out non-HeapObjects and objects which do not reside in new space.
-class ScavengeVisitor : public ObjectVisitor {
+// TODO(ulan): ObjectVisitor is needed only for code flusher. Remove it after
+// changing the scanvenger to treat JSFunction->next_link strongly.
+class RootScavengeVisitor : public ObjectVisitor, public RootVisitor {
public:
- explicit ScavengeVisitor(Heap* heap) : heap_(heap) {}
+ explicit RootScavengeVisitor(Heap* heap) : heap_(heap) {}
void VisitPointer(Object** p) override;
void VisitPointers(Object** start, Object** end) override;
+ void VisitRootPointer(Root root, Object** p) override;
+ void VisitRootPointers(Root root, Object** start, Object** end) override;
+
private:
inline void ScavengePointer(Object** p);
« no previous file with comments | « src/heap/object-stats.cc ('k') | src/heap/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698