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

Unified Diff: runtime/vm/store_buffer.h

Issue 1271833002: Chunk-wise marking stack processing. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Encapsulate visitor's interface to marking stack in WorkList inner class. Created 5 years, 4 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: runtime/vm/store_buffer.h
diff --git a/runtime/vm/store_buffer.h b/runtime/vm/store_buffer.h
index b1bd387e8fb87d8d657fd0a310adf5a94528ca57..656e0230aa619943d7346d5d132c4c4915a34466 100644
--- a/runtime/vm/store_buffer.h
+++ b/runtime/vm/store_buffer.h
@@ -42,6 +42,11 @@ class StoreBufferBlock {
return pointers_[--top_];
}
+ RawObject* At(intptr_t index) {
Ivan Posva 2015/08/06 07:02:09 Is this still needed?
koda 2015/08/07 12:59:07 No. Removed.
+ ASSERT(0 <= index && index < top_);
+ return pointers_[index];
+ }
+
#if defined(TESTING)
bool Contains(RawObject* obj) const {
for (intptr_t i = 0; i < Count(); i++) {
@@ -88,8 +93,9 @@ class StoreBuffer {
// Partially filled blocks can be reused, and there is an "inifite" supply
// of empty blocks (reused or newly allocated). In any case, the caller
// takes ownership of the returned block.
- StoreBufferBlock* PopBlock();
+ StoreBufferBlock* PopNonFullBlock();
StoreBufferBlock* PopEmptyBlock();
+ StoreBufferBlock* PopNonEmptyBlock();
// Pops and returns all non-empty blocks as a linked list (owned by caller).
StoreBufferBlock* Blocks();
@@ -100,6 +106,8 @@ class StoreBuffer {
// Check whether non-empty blocks have exceeded kMaxNonEmpty.
bool Overflowed();
+ bool IsEmpty();
+
private:
class List {
public:

Powered by Google App Engine
This is Rietveld 408576698