Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index a00a92d5fdfeeeb19be54dddc1a06e388f4cca50..db9748a4aeef08d17ad707eb8ad4b2fb0b95520a 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -1290,12 +1290,10 @@ void LCodeGen::DoDateField(LDateField* instr) { |
ASSERT(!scratch.is(scratch0())); |
ASSERT(!scratch.is(object)); |
-#ifdef DEBUG |
- __ AbortIfSmi(object); |
+ __ And(at, object, Operand(kSmiTagMask)); |
+ DeoptimizeIf(eq, instr->environment(), at, Operand(zero_reg)); |
__ GetObjectType(object, scratch, scratch); |
- __ Assert(eq, "Trying to get date field from non-date.", |
- scratch, Operand(JS_DATE_TYPE)); |
-#endif |
+ DeoptimizeIf(ne, instr->environment(), scratch, Operand(JS_DATE_TYPE)); |
if (index->value() == 0) { |
__ lw(result, FieldMemOperand(object, JSDate::kValueOffset)); |
@@ -1973,9 +1971,7 @@ void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) { |
Register input = ToRegister(instr->InputAt(0)); |
Register result = ToRegister(instr->result()); |
- if (FLAG_debug_code) { |
- __ AbortIfNotString(input); |
- } |
+ __ AbortIfNotString(input); |
__ lw(result, FieldMemOperand(input, String::kHashFieldOffset)); |
__ IndexFromHash(result, result); |