Commit e93f06ad authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Don't need any write barrier when storing maps from the root set.

Maps that are immortal immovable (i.e. the one pointer filler map) don't
need write barriers.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/1945023003
Cr-Commit-Position: refs/heads/master@{#36016}
parent 4b3953df
......@@ -733,10 +733,6 @@ class RepresentationSelector {
value_type->AsConstant()->Value()->IsHeapObject()) {
Handle<HeapObject> value_object =
Handle<HeapObject>::cast(value_type->AsConstant()->Value());
if (value_object->IsMap()) {
// Write barriers for storing maps are cheaper.
return kMapWriteBarrier;
}
RootIndexMap root_index_map(jsgraph_->isolate());
int root_index = root_index_map.Lookup(*value_object);
if (root_index != RootIndexMap::kInvalidRootIndex &&
......@@ -744,6 +740,10 @@ class RepresentationSelector {
// Write barriers are unnecessary for immortal immovable roots.
return kNoWriteBarrier;
}
if (value_object->IsMap()) {
// Write barriers for storing maps are cheaper.
return kMapWriteBarrier;
}
}
if (field_type->Is(Type::TaggedPointer()) ||
value_type->Is(Type::TaggedPointer())) {
......
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