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

Unified Diff: src/heap/mark-compact.h

Issue 2735803005: [heap] Start concurrent marking simultaneously with incremental marking. (Closed)
Patch Set: tweak Created 3 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
Index: src/heap/mark-compact.h
diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
index 254748174fdfd3f1c1210b9bd8345f1b01c3c71a..8041bfe3eaebd7be66eba7cb60117b1d25963b46 100644
--- a/src/heap/mark-compact.h
+++ b/src/heap/mark-compact.h
@@ -177,6 +177,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_; }

Powered by Google App Engine
This is Rietveld 408576698