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

Unified Diff: src/heap/store-buffer-inl.h

Issue 1739003003: Version 5.0.71.2 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.0
Patch Set: Created 4 years, 10 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/store-buffer.h ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/store-buffer-inl.h
diff --git a/src/heap/store-buffer-inl.h b/src/heap/store-buffer-inl.h
index cf88e25aea934293fe7e2c66e96fabbbf25a1e9c..920ec3411dc16687efc604441a3f3037818f4c9d 100644
--- a/src/heap/store-buffer-inl.h
+++ b/src/heap/store-buffer-inl.h
@@ -13,6 +13,22 @@
namespace v8 {
namespace internal {
+void LocalStoreBuffer::Record(Address addr) {
+ if (top_->is_full()) top_ = new Node(top_);
+ top_->buffer[top_->count++] = addr;
+}
+
+void LocalStoreBuffer::Process(StoreBuffer* store_buffer) {
+ Node* current = top_;
+ while (current != nullptr) {
+ for (int i = 0; i < current->count; i++) {
+ Address slot = current->buffer[i];
+ Page* page = Page::FromAnyPointerAddress(heap_, slot);
+ RememberedSet<OLD_TO_NEW>::Insert(page, slot);
+ }
+ current = current->next;
+ }
+}
} // namespace internal
} // namespace v8
« no previous file with comments | « src/heap/store-buffer.h ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698