Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 26bebce766427039cef513011c72f3e0e7cc2174..01f5bd6234009d9227f5de801f838066416dc929 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -1444,11 +1444,10 @@ void LCodeGen::DoDateField(LDateField* instr) { |
ASSERT(object.is(result)); |
ASSERT(object.is(eax)); |
-#ifdef DEBUG |
- __ AbortIfSmi(object); |
+ __ test(object, Immediate(kSmiTagMask)); |
+ DeoptimizeIf(zero, instr->environment()); |
__ CmpObjectType(object, JS_DATE_TYPE, scratch); |
- __ Assert(equal, "Trying to get date field from non-date."); |
-#endif |
+ DeoptimizeIf(not_equal, instr->environment()); |
if (index->value() == 0) { |
__ mov(result, FieldOperand(object, JSDate::kValueOffset)); |
@@ -2070,9 +2069,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); |
__ mov(result, FieldOperand(input, String::kHashFieldOffset)); |
__ IndexFromHash(result, result); |