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

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 1278c2a50d8acb4e406920852b409d874a3770f4..fe20637a3dd74efbd5e73e08c89013501725c411 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2038,13 +2038,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.
- if (heap->InNewSpace(val)) {
- heap->RecordWrite(address(), kValueOffset);
- }
+ WriteBarrierMode mode =
+ Page::FromAddress(this->address())->IsFlagSet(Page::BLACK_PAGE)
+ ? UPDATE_WRITE_BARRIER
ulan 2016/02/10 10:27:39 Invoking the marking visitor of the weak cell migh
Hannes Payer (out of office) 2016/02/11 18:18:07 As discussed offline, this change was done on purp
+ : UPDATE_WEAK_WRITE_BARRIER;
+ CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kValueOffset, val, mode);
}
« src/heap/mark-compact.cc ('K') | « src/objects.cc ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698