[heap] Do not clear slots on left trim operation

Do not clear old-to-new slots for the new FixedArray's map and length
word on left trim because these fields are tagged.

Bug: v8:9454
Change-Id: I9947a93f80efc6669498ed4c0171d728aebc782b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1767997
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63363}
This commit is contained in:
Dominik Inführ 2019-08-23 10:18:59 +02:00 committed by Commit Bot
parent 0af80a3796
commit c65adf4393

View File

@ -2998,11 +2998,6 @@ 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, new_object.RawField(0));
ClearRecordedSlot(new_object,
new_object.RawField(FixedArrayBase::kLengthOffset));
// Handle invalidated old-to-old slots.
if (incremental_marking()->IsCompacting() &&
MayContainRecordedSlots(new_object)) {