Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 52e80d29f3a767fa1987e578db44f9af38f9531e..6ef33f4449507daf2359fcfa4d578a0ff2b4ec3e 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -3274,14 +3274,19 @@ void MacroAssembler::AllocateHeapNumber(Register result, |
Register scratch2, |
Register heap_number_map, |
Label* need_gc, |
- 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, need_gc, |
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) { |
sw(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset)); |
} else { |