Index: src/ic.cc |
diff --git a/src/ic.cc b/src/ic.cc |
index 9a1b55cc71ec0701968dc46aabb0ad7cfbe33bb9..980dd0846dc1f9fb9bbda858e86eadc0f2d41296 100644 |
--- a/src/ic.cc |
+++ b/src/ic.cc |
@@ -2141,6 +2141,7 @@ const char* CompareIC::GetStateName(State state) { |
case SMIS: return "SMIS"; |
case HEAP_NUMBERS: return "HEAP_NUMBERS"; |
case OBJECTS: return "OBJECTS"; |
+ case STRINGS: return "STRINGS"; |
case GENERIC: return "GENERIC"; |
default: |
UNREACHABLE(); |
@@ -2159,6 +2160,8 @@ CompareIC::State CompareIC::TargetState(State state, |
x->IsNumber() && y->IsNumber()) return HEAP_NUMBERS; |
if (op_ != Token::EQ && op_ != Token::EQ_STRICT) return GENERIC; |
if (state == UNINITIALIZED && |
+ x->IsString() && y->IsString()) return STRINGS; |
+ if (state == UNINITIALIZED && |
x->IsJSObject() && y->IsJSObject()) return OBJECTS; |
return GENERIC; |
} |