Index: src/mips/ic-mips.cc |
diff --git a/src/mips/ic-mips.cc b/src/mips/ic-mips.cc |
index cf706815e3ac615f61a78ef5fc10b0f8eb611e8d..8a58bcca045de3f0d6cc493b5592f4ea9d4597a3 100644 |
--- a/src/mips/ic-mips.cc |
+++ b/src/mips/ic-mips.cc |
@@ -1695,36 +1695,16 @@ Condition CompareIC::ComputeCondition(Token::Value op) { |
} |
-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); |
- if (state == GENERIC) { |
- CompareStub stub(GetCondition(), strict(), NO_COMPARE_FLAGS, a1, a0); |
- rewritten = stub.GetCode(); |
- } else { |
- ICCompareStub stub(op_, state); |
- if (state == KNOWN_OBJECTS) { |
- stub.set_known_map(Handle<Map>(Handle<JSObject>::cast(x)->map())); |
- } |
- rewritten = stub.GetCode(); |
- } |
- set_target(*rewritten); |
- |
-#ifdef DEBUG |
- if (FLAG_trace_ic) { |
- PrintF("[CompareIC (%s->%s)#%s]\n", |
- GetStateName(previous_state), |
- GetStateName(state), |
- Token::Name(op_)); |
- } |
-#endif |
+bool CompareIC::HasInlinedSmiCode(Address address) { |
+ // The address of the instruction following the call. |
+ Address andi_instruction_address = |
+ address + Assembler::kCallTargetAddressOffset; |
- // Activate inlined smi code. |
- if (previous_state == UNINITIALIZED) { |
- PatchInlinedSmiCode(address(), ENABLE_INLINED_SMI_CHECK); |
- } |
+ // If the instruction following the call is not a andi at, rx, #yyy, nothing |
+ // was inlined. |
+ Instr instr = Assembler::instr_at(andi_instruction_address); |
+ return Assembler::IsAndImmediate(instr) && |
+ Assembler::GetRt(instr) == (uint32_t)zero_reg.code(); |
} |