Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 9f4a789724082adf0d3e7f9c34b671ddbe80109f..8d5c7faef153ae34d3c0fa9616b24955db797ed6 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -1592,11 +1592,10 @@ void LCodeGen::DoDateField(LDateField* instr) { |
ASSERT(!scratch.is(scratch0())); |
ASSERT(!scratch.is(object)); |
-#ifdef DEBUG |
- __ AbortIfSmi(object); |
+ __ tst(object, Operand(kSmiTagMask)); |
+ DeoptimizeIf(eq, instr->environment()); |
__ CompareObjectType(object, scratch, scratch, JS_DATE_TYPE); |
- __ Assert(eq, "Trying to get date field from non-date."); |
-#endif |
+ DeoptimizeIf(ne, instr->environment()); |
if (index->value() == 0) { |
__ ldr(result, FieldMemOperand(object, JSDate::kValueOffset)); |
@@ -2232,9 +2231,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); |
__ ldr(result, FieldMemOperand(input, String::kHashFieldOffset)); |
__ IndexFromHash(result, result); |