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

Unified Diff: runtime/vm/object_graph.cc

Issue 1838373002: Remove unnecessary isolate argument from some visitors (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cleanup Created 4 years, 9 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 | « runtime/vm/object.cc ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_graph.cc
diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc
index 145b84e3ef4570e9b12a99950c36390a9f924011..bbecac73b11bfdaf1717a3bf6a33c81fb8769b9e 100644
--- a/runtime/vm/object_graph.cc
+++ b/runtime/vm/object_graph.cc
@@ -138,7 +138,7 @@ intptr_t ObjectGraph::StackIterator::OffsetFromParentInWords() const {
class Unmarker : public ObjectVisitor {
public:
- explicit Unmarker(Isolate* isolate) : ObjectVisitor(isolate) { }
+ Unmarker() { }
void VisitObject(RawObject* obj) {
if (obj->IsMarked()) {
@@ -147,7 +147,7 @@ class Unmarker : public ObjectVisitor {
}
static void UnmarkAll(Isolate* isolate) {
- Unmarker unmarker(isolate);
+ Unmarker unmarker;
isolate->heap()->IterateObjects(&unmarker);
}
@@ -192,10 +192,8 @@ void ObjectGraph::IterateObjectsFrom(const Object& root,
class InstanceAccumulator : public ObjectVisitor {
public:
- explicit InstanceAccumulator(ObjectGraph::Stack* stack,
- intptr_t class_id,
- Isolate* isolate)
- : ObjectVisitor(isolate), stack_(stack), class_id_(class_id) { }
+ InstanceAccumulator(ObjectGraph::Stack* stack, intptr_t class_id)
+ : stack_(stack), class_id_(class_id) { }
void VisitObject(RawObject* obj) {
if (obj->GetClassId() == class_id_) {
@@ -217,7 +215,7 @@ void ObjectGraph::IterateObjectsFrom(intptr_t class_id,
NoSafepointScope no_safepoint_scope_;
Stack stack(isolate());
- InstanceAccumulator accumulator(&stack, class_id, isolate());
+ InstanceAccumulator accumulator(&stack, class_id);
isolate()->heap()->IterateObjects(&accumulator);
stack.TraverseGraph(visitor);
@@ -376,7 +374,7 @@ class InboundReferencesVisitor : public ObjectVisitor,
RawObject* target,
const Array& references,
Object* scratch)
- : ObjectVisitor(isolate), ObjectPointerVisitor(isolate), source_(NULL),
+ : ObjectPointerVisitor(isolate), source_(NULL),
target_(target), references_(references), scratch_(scratch), length_(0) {
ASSERT(Thread::Current()->no_safepoint_scope_depth() != 0);
}
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698