[turbofan] We don't need write barriers for immortal immovable maps.

WriteBarrierKindFor would always return kMapWriteBarrier in
SimplifiedLowering even if the map that's to be stored is part
of the immortal immovable roots which don't need write barriers
ever.

Bug: v8:7310
Change-Id: I0a87a1c3ddd7f71ccf8ebacba8409067dc00cd1c
Reviewed-on: https://chromium-review.googlesource.com/928564
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51431}
This commit is contained in:
Benedikt Meurer 2018-02-21 13:24:02 +01:00 committed by Commit Bot
parent 7badc3f0c4
commit a98c889313

View File

@ -1237,12 +1237,16 @@ class RepresentationSelector {
MachineRepresentation field_representation, int field_offset,
Type* field_type, MachineRepresentation value_representation,
Node* value) {
if (base_taggedness == kTaggedBase &&
field_offset == HeapObject::kMapOffset) {
return kMapWriteBarrier;
WriteBarrierKind write_barrier_kind =
WriteBarrierKindFor(base_taggedness, field_representation, field_type,
value_representation, value);
if (write_barrier_kind != kNoWriteBarrier) {
if (base_taggedness == kTaggedBase &&
field_offset == HeapObject::kMapOffset) {
write_barrier_kind = kMapWriteBarrier;
}
}
return WriteBarrierKindFor(base_taggedness, field_representation,
field_type, value_representation, value);
return write_barrier_kind;
}
Graph* graph() const { return jsgraph_->graph(); }