Index: src/heap/mark-compact.h |
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h |
index 2ebf4a720c19a5dd0e55779584f6d26039c7ab86..63afd834ea1e31f184d3bd70e233c6e2736a8ea5 100644 |
--- a/src/heap/mark-compact.h |
+++ b/src/heap/mark-compact.h |
@@ -186,6 +186,15 @@ class MarkingDeque { |
} |
} |
+ template <typename Callback> |
+ void Iterate(Callback callback) { |
+ int i = bottom_; |
+ while (i != top_) { |
+ callback(array_[i]); |
+ i = (i + 1) & mask_; |
+ } |
+ } |
+ |
HeapObject** array() { return array_; } |
int bottom() { return bottom_; } |
int top() { return top_; } |