Commit 0acd9a4b authored by ulan's avatar ulan Committed by Commit bot

[heap] Remove recorded slots in fixed array header area on left trimming.

BUG=

Review URL: https://codereview.chromium.org/1887343004

Cr-Commit-Position: refs/heads/master@{#35540}
parent 62801ee3
...@@ -3137,7 +3137,6 @@ FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object, ...@@ -3137,7 +3137,6 @@ FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object,
// we still do it. // we still do it.
CreateFillerObjectAt(object->address(), bytes_to_trim, CreateFillerObjectAt(object->address(), bytes_to_trim,
ClearRecordedSlots::kYes); ClearRecordedSlots::kYes);
// Initialize header of the trimmed array. Since left trimming is only // Initialize header of the trimmed array. Since left trimming is only
// performed on pages which are not concurrently swept creating a filler // performed on pages which are not concurrently swept creating a filler
// object does not require synchronization. // object does not require synchronization.
...@@ -3149,6 +3148,11 @@ FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object, ...@@ -3149,6 +3148,11 @@ FixedArrayBase* Heap::LeftTrimFixedArray(FixedArrayBase* object,
FixedArrayBase* new_object = FixedArrayBase* new_object =
FixedArrayBase::cast(HeapObject::FromAddress(new_start)); 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 // Maintain consistency of live bytes during incremental marking
Marking::TransferMark(this, object->address(), new_start); Marking::TransferMark(this, object->address(), new_start);
AdjustLiveBytes(new_object, -bytes_to_trim, Heap::CONCURRENT_TO_SWEEPER); AdjustLiveBytes(new_object, -bytes_to_trim, Heap::CONCURRENT_TO_SWEEPER);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment