Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index c35fb9e506a5cd237f596962afd9d2b025a207fa..0d7a1d8bcb52e830f7fda05efb5a04334206bdf9 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -3274,14 +3274,19 @@ void MacroAssembler::AllocateHeapNumber(Register result, |
Register scratch2, |
Register heap_number_map, |
Label* gc_required, |
- TaggingMode tagging_mode) { |
+ TaggingMode tagging_mode, |
+ MutableMode mode) { |
// Allocate an object in the heap for the heap number and tag it as a heap |
// object. |
Allocate(HeapNumber::kSize, result, scratch1, scratch2, gc_required, |
tagging_mode == TAG_RESULT ? TAG_OBJECT : NO_ALLOCATION_FLAGS); |
+ Heap::RootListIndex map_index = mode == MUTABLE |
+ ? Heap::kMutableHeapNumberMapRootIndex |
+ : Heap::kHeapNumberMapRootIndex; |
+ AssertIsRoot(heap_number_map, map_index); |
+ |
// Store heap number map in the allocated object. |
- AssertIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); |
if (tagging_mode == TAG_RESULT) { |
str(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset)); |
} else { |