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

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

Issue 2735803005: [heap] Start concurrent marking simultaneously with incremental marking. (Closed)
Patch Set: fix test 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/incremental-marking.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_; }
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698