Index: src/x64/ic-x64.cc |
diff --git a/src/x64/ic-x64.cc b/src/x64/ic-x64.cc |
index e5a4bfcfb5aa3691ebfaf8b190d51785d591c4a7..25f557baff0c19ba21b70dc6fec389d690605f72 100644 |
--- a/src/x64/ic-x64.cc |
+++ b/src/x64/ic-x64.cc |
@@ -1673,11 +1673,23 @@ Condition CompareIC::ComputeCondition(Token::Value op) { |
} |
+static bool HasInlinedSmiCode(Address address) { |
+ // The address of the instruction following the call. |
+ Address test_instruction_address = |
+ address + Assembler::kCallTargetAddressOffset; |
+ |
+ // If the instruction following the call is not a test al, nothing |
+ // was inlined. |
+ return *test_instruction_address == Assembler::kTestAlByte; |
+} |
+ |
+ |
void CompareIC::UpdateCaches(Handle<Object> x, Handle<Object> y) { |
HandleScope scope; |
Handle<Code> rewritten; |
State previous_state = GetState(); |
- State state = TargetState(previous_state, false, x, y); |
+ |
+ State state = TargetState(previous_state, HasInlinedSmiCode(address()), x, y); |
if (state == GENERIC) { |
CompareStub stub(GetCondition(), strict(), NO_COMPARE_FLAGS); |
rewritten = stub.GetCode(); |