| Index: src/compiler/simplified-lowering.cc
|
| diff --git a/src/compiler/simplified-lowering.cc b/src/compiler/simplified-lowering.cc
|
| index af2f2518fa5dddd5fa33f8969bbe4ea0c5b0afed..afad38b0c4ffb81744c4b98bab362c221671ffcb 100644
|
| --- a/src/compiler/simplified-lowering.cc
|
| +++ b/src/compiler/simplified-lowering.cc
|
| @@ -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())) {
|
|
|