Index: src/compiler/load-elimination.cc |
diff --git a/src/compiler/load-elimination.cc b/src/compiler/load-elimination.cc |
index 2c688a1cb58ab4246c7e9ccf03a48412a7e969b2..d216b0dc4cd3b01cec5b0e712b2e7464597d058d 100644 |
--- a/src/compiler/load-elimination.cc |
+++ b/src/compiler/load-elimination.cc |
@@ -1007,8 +1007,15 @@ LoadElimination::AbstractState const* LoadElimination::ComputeLoopState( |
!ZoneHandleSet<Map>(transition.target()) |
.contains(object_maps)) { |
state = state->KillMaps(object, zone()); |
- state = state->KillField( |
- object, FieldIndexOf(JSObject::kElementsOffset), zone()); |
+ switch (transition.mode()) { |
+ case ElementsTransition::kFastTransition: |
+ break; |
+ case ElementsTransition::kSlowTransition: |
+ // Kill the elements as well. |
+ state = state->KillField( |
+ object, FieldIndexOf(JSObject::kElementsOffset), zone()); |
+ break; |
+ } |
} |
break; |
} |