Index: src/compiler/js-native-context-specialization.cc |
diff --git a/src/compiler/js-native-context-specialization.cc b/src/compiler/js-native-context-specialization.cc |
index dca55370dd12ba16b5ebde4041da41b3e11b2fcb..c122634cbb5e82038f7ce6f81a1ae3dc9dc1feea 100644 |
--- a/src/compiler/js-native-context-specialization.cc |
+++ b/src/compiler/js-native-context-specialization.cc |
@@ -972,13 +972,9 @@ JSNativeContextSpecialization::BuildElementAccess( |
// Don't try to store to a copy-on-write backing store. |
if (access_mode == AccessMode::kStore && |
IsFastSmiOrObjectElementsKind(elements_kind)) { |
- Node* elements_map = effect = |
- graph()->NewNode(simplified()->LoadField(AccessBuilder::ForMap()), |
- elements, effect, control); |
- Node* check = graph()->NewNode( |
- simplified()->ReferenceEqual(Type::Any()), elements_map, |
- jsgraph()->HeapConstant(factory()->fixed_array_map())); |
- effect = graph()->NewNode(simplified()->CheckIf(), check, effect, control); |
+ effect = graph()->NewNode( |
+ simplified()->CheckMaps(1), elements, |
+ jsgraph()->HeapConstant(factory()->fixed_array_map()), effect, control); |
} |
if (IsFixedTypedArrayElementsKind(elements_kind)) { |