| Index: src/ia32/ic-ia32.cc
|
| diff --git a/src/ia32/ic-ia32.cc b/src/ia32/ic-ia32.cc
|
| index fdcb1f5894bbdd5d3b4298c4d10c8e3443d50b75..d713601d167347e6f3090235017da8535703a2ac 100644
|
| --- a/src/ia32/ic-ia32.cc
|
| +++ b/src/ia32/ic-ia32.cc
|
| @@ -2049,12 +2049,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, x, y);
|
| + State state = TargetState(previous_state, HasInlinedSmiCode(address()), x, y);
|
| if (state == GENERIC) {
|
| CompareStub stub(GetCondition(), strict(), NO_COMPARE_FLAGS);
|
| rewritten = stub.GetCode();
|
|
|