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

Unified Diff: src/objects-inl.h

Issue 1420423009: [heap] Black allocation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 71e2f02bbbc42c7360aee6bac6f53dc55b8c11f4..42e3ccde7f0f686bcb8bcb05ebb8ef3f50ed7fea 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2034,11 +2034,14 @@ void WeakCell::clear() {
void WeakCell::initialize(HeapObject* val) {
WRITE_FIELD(this, kValueOffset, val);
- Heap* heap = GetHeap();
// We just have to execute the generational barrier here because we never
// mark through a weak cell and collect evacuation candidates when we process
// all weak cells.
- heap->RecordWrite(this, kValueOffset, val);
+ WriteBarrierMode mode =
+ Page::FromAddress(this->address())->IsFlagSet(Page::BLACK_PAGE)
+ ? UPDATE_WRITE_BARRIER
+ : UPDATE_WEAK_WRITE_BARRIER;
+ CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kValueOffset, val, mode);
}
« src/heap/heap.cc ('K') | « src/objects.cc ('k') | src/snapshot/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698