Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 21ef8c019fb410b26214f1751c53e27e3a8579fb..c479b907178342b42555a021cb4cd1986685ff1a 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -7094,7 +7094,9 @@ HValue* HOptimizedGraphBuilder::HandlePolymorphicElementAccess( |
MapHandleList possible_transitioned_maps(maps->length()); |
for (int i = 0; i < maps->length(); ++i) { |
Handle<Map> map = maps->at(i); |
- DCHECK(!map->IsStringMap()); |
+ // Loads from strings or loads with a mix of string and non-string maps |
+ // shouldn't be handled polymorphically. |
+ DCHECK(access_type != LOAD || !map->IsStringMap()); |
ElementsKind elements_kind = map->elements_kind(); |
if (CanInlineElementAccess(map) && IsFastElementsKind(elements_kind) && |
elements_kind != GetInitialFastElementsKind()) { |