Index: src/ic.cc |
diff --git a/src/ic.cc b/src/ic.cc |
index b485a0173d3f605474d0b73d3e0f4b073765e62c..645c6fdcf6542304d6b67901e1c649ede62a566e 100644 |
--- a/src/ic.cc |
+++ b/src/ic.cc |
@@ -2133,13 +2133,16 @@ const char* CompareIC::GetStateName(State state) { |
CompareIC::State CompareIC::TargetState(State state, |
+ bool has_inlined_smi_code, |
Handle<Object> x, |
Handle<Object> y) { |
- if (state != UNINITIALIZED) return GENERIC; |
- if (x->IsSmi() && y->IsSmi()) return SMIS; |
- if (x->IsNumber() && y->IsNumber()) return HEAP_NUMBERS; |
+ if (!has_inlined_smi_code && state != UNINITIALIZED) return GENERIC; |
+ if (state == UNINITIALIZED && x->IsSmi() && y->IsSmi()) return SMIS; |
+ if ((state == UNINITIALIZED || (state == SMIS && has_inlined_smi_code)) && |
+ x->IsNumber() && y->IsNumber()) return HEAP_NUMBERS; |
fschneider
2010/12/11 15:18:46
Would the condition
(state == UNINITIALIZED || st
|
if (op_ != Token::EQ && op_ != Token::EQ_STRICT) return GENERIC; |
- if (x->IsJSObject() && y->IsJSObject()) return OBJECTS; |
+ if (state == UNINITIALIZED && |
+ x->IsJSObject() && y->IsJSObject()) return OBJECTS; |
return GENERIC; |
} |