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

Unified Diff: src/heap/heap.cc

Issue 1887343004: [heap] Remove recorded slots in fixed array header area on left trimming. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index c6e6b600290438bc84f571472bec206db948910c..58b860874bf46de3f0bcec742d866d5b95dd8cd1 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -3137,7 +3137,6 @@ FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object,
// we still do it.
CreateFillerObjectAt(object->address(), bytes_to_trim,
ClearRecordedSlots::kYes);
-
// Initialize header of the trimmed array. Since left trimming is only
// performed on pages which are not concurrently swept creating a filler
// object does not require synchronization.
@@ -3149,6 +3148,11 @@ FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object,
FixedArrayBase* new_object =
FixedArrayBase::cast(HeapObject::FromAddress(new_start));
+ // Remove recorded slots for the new map and length offset.
+ ClearRecordedSlot(new_object, HeapObject::RawField(object, 0));
+ ClearRecordedSlot(
+ new_object, HeapObject::RawField(object, FixedArrayBase::kLengthOffset));
+
// Maintain consistency of live bytes during incremental marking
Marking::TransferMark(this, object->address(), new_start);
AdjustLiveBytes(new_object, -bytes_to_trim, Heap::CONCURRENT_TO_SWEEPER);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698