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

Unified Diff: runtime/vm/heap.cc

Issue 1090053003: - Avoid inconsistency of for example IterateObjects vs VisitObjects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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 | « runtime/vm/heap.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap.cc
===================================================================
--- runtime/vm/heap.cc (revision 45220)
+++ runtime/vm/heap.cc (working copy)
@@ -211,38 +211,18 @@
}
-void Heap::IterateObjects(ObjectVisitor* visitor) const {
+void Heap::VisitObjects(ObjectVisitor* visitor) const {
new_space_->VisitObjects(visitor);
old_space_->VisitObjects(visitor);
}
-void Heap::IteratePointers(ObjectPointerVisitor* visitor) const {
+void Heap::VisitObjectPointers(ObjectPointerVisitor* visitor) const {
new_space_->VisitObjectPointers(visitor);
old_space_->VisitObjectPointers(visitor);
}
-void Heap::IterateNewPointers(ObjectPointerVisitor* visitor) const {
- new_space_->VisitObjectPointers(visitor);
-}
-
-
-void Heap::IterateOldPointers(ObjectPointerVisitor* visitor) const {
- old_space_->VisitObjectPointers(visitor);
-}
-
-
-void Heap::IterateNewObjects(ObjectVisitor* visitor) const {
- new_space_->VisitObjects(visitor);
-}
-
-
-void Heap::IterateOldObjects(ObjectVisitor* visitor) const {
- old_space_->VisitObjects(visitor);
-}
-
-
RawInstructions* Heap::FindObjectInCodeSpace(FindObjectVisitor* visitor) const {
// Only executable pages can have RawInstructions objects.
RawObject* raw_obj = old_space_->FindObject(visitor, HeapPage::kExecutable);
@@ -482,13 +462,13 @@
{
VerifyObjectVisitor object_visitor(
isolate(), allocated_set, mark_expectation);
- this->IterateObjects(&object_visitor);
+ this->VisitObjects(&object_visitor);
}
{
// VM isolate heap is premarked.
VerifyObjectVisitor vm_object_visitor(
isolate(), allocated_set, kRequireMarked);
- vm_isolate->heap()->IterateObjects(&vm_object_visitor);
+ vm_isolate->heap()->VisitObjects(&vm_object_visitor);
}
return allocated_set;
}
@@ -497,7 +477,7 @@
bool Heap::Verify(MarkExpectation mark_expectation) const {
ObjectSet* allocated_set = CreateAllocatedObjectSet(mark_expectation);
VerifyPointersVisitor visitor(isolate(), allocated_set);
- IteratePointers(&visitor);
+ VisitObjectPointers(&visitor);
delete allocated_set;
// Only returning a value so that Heap::Validate can be called from an ASSERT.
return true;
« no previous file with comments | « runtime/vm/heap.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698