Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index 8b0779bcf26fb41621d0b9e606f966f30326eb90..a6aff15cff0bef0026399606e854225be309110d 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -655,11 +655,9 @@ void FloatingPointHelper::LoadNumber(MacroAssembler* masm, |
Register scratch1, |
Register scratch2, |
Label* not_number) { |
- if (FLAG_debug_code) { |
- __ AbortIfNotRootValue(heap_number_map, |
- Heap::kHeapNumberMapRootIndex, |
- "HeapNumberMap register clobbered."); |
- } |
+ __ AssertRootValue(heap_number_map, |
+ Heap::kHeapNumberMapRootIndex, |
+ "HeapNumberMap register clobbered."); |
Label is_smi, done; |
@@ -716,11 +714,9 @@ void FloatingPointHelper::ConvertNumberToInt32(MacroAssembler* masm, |
Register scratch3, |
DwVfpRegister double_scratch, |
Label* not_number) { |
- if (FLAG_debug_code) { |
- __ AbortIfNotRootValue(heap_number_map, |
- Heap::kHeapNumberMapRootIndex, |
- "HeapNumberMap register clobbered."); |
- } |
+ __ AssertRootValue(heap_number_map, |
+ Heap::kHeapNumberMapRootIndex, |
+ "HeapNumberMap register clobbered."); |
Label done; |
Label not_in_int32_range; |
@@ -849,11 +845,9 @@ void FloatingPointHelper::LoadNumberAsInt32Double(MacroAssembler* masm, |
__ b(&done); |
__ bind(&obj_is_not_smi); |
- if (FLAG_debug_code) { |
- __ AbortIfNotRootValue(heap_number_map, |
- Heap::kHeapNumberMapRootIndex, |
- "HeapNumberMap register clobbered."); |
- } |
+ __ AssertRootValue(heap_number_map, |
+ Heap::kHeapNumberMapRootIndex, |
+ "HeapNumberMap register clobbered."); |
__ JumpIfNotHeapNumber(object, heap_number_map, scratch1, not_int32); |
// Load the number. |
@@ -920,11 +914,9 @@ void FloatingPointHelper::LoadNumberAsInt32(MacroAssembler* masm, |
__ UntagAndJumpIfSmi(dst, object, &done); |
- if (FLAG_debug_code) { |
- __ AbortIfNotRootValue(heap_number_map, |
- Heap::kHeapNumberMapRootIndex, |
- "HeapNumberMap register clobbered."); |
- } |
+ __ AssertRootValue(heap_number_map, |
+ Heap::kHeapNumberMapRootIndex, |
+ "HeapNumberMap register clobbered."); |
__ JumpIfNotHeapNumber(object, heap_number_map, scratch1, not_int32); |
// Object is a heap number. |
@@ -2545,9 +2537,9 @@ void BinaryOpStub::GenerateFPOperation(MacroAssembler* masm, |
Register scratch3 = r4; |
ASSERT(smi_operands || (not_numbers != NULL)); |
- if (smi_operands && FLAG_debug_code) { |
- __ AbortIfNotSmi(left); |
- __ AbortIfNotSmi(right); |
+ if (smi_operands) { |
+ __ AssertSmi(left); |
+ __ AssertSmi(right); |
} |
Register heap_number_map = r6; |
@@ -7065,8 +7057,7 @@ void StringDictionaryLookupStub::GeneratePositiveLookup(MacroAssembler* masm, |
ASSERT(!name.is(scratch1)); |
ASSERT(!name.is(scratch2)); |
- // Assert that name contains a string. |
- if (FLAG_debug_code) __ AbortIfNotString(name); |
+ __ AssertString(name); |
// Compute the capacity mask. |
__ ldr(scratch1, FieldMemOperand(elements, kCapacityOffset)); |