Index: src/mips/code-stubs-mips.cc |
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc |
index ee3127aafd71e0fe8dff6607aa8d8a12384474c6..0b551fbed5243594f9498364fb52b2448a82d55a 100644 |
--- a/src/mips/code-stubs-mips.cc |
+++ b/src/mips/code-stubs-mips.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; |
@@ -721,11 +719,9 @@ void FloatingPointHelper::ConvertNumberToInt32(MacroAssembler* masm, |
Register scratch3, |
FPURegister 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; |
@@ -861,11 +857,9 @@ void FloatingPointHelper::LoadNumberAsInt32Double(MacroAssembler* masm, |
__ Branch(&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. |
@@ -932,11 +926,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. |
@@ -2619,9 +2611,9 @@ void BinaryOpStub::GenerateFPOperation(MacroAssembler* masm, |
Register scratch3 = t0; |
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 = t2; |
@@ -7265,8 +7257,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. |
__ lw(scratch1, FieldMemOperand(elements, kCapacityOffset)); |