Index: src/x87/macro-assembler-x87.cc |
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc |
index 585f9c023b4b58129a0c4eddb4cd248be3c280a6..111aed9a2e6b6b9cf6591f223de96348943fe643 100644 |
--- a/src/x87/macro-assembler-x87.cc |
+++ b/src/x87/macro-assembler-x87.cc |
@@ -1576,14 +1576,18 @@ void MacroAssembler::UndoAllocationInNewSpace(Register object) { |
void MacroAssembler::AllocateHeapNumber(Register result, |
Register scratch1, |
Register scratch2, |
- Label* gc_required) { |
+ Label* gc_required, |
+ MutableMode mode) { |
// Allocate heap number in new space. |
Allocate(HeapNumber::kSize, result, scratch1, scratch2, gc_required, |
TAG_OBJECT); |
+ Handle<Map> map = mode == MUTABLE |
+ ? isolate()->factory()->mutable_heap_number_map() |
+ : isolate()->factory()->heap_number_map(); |
+ |
// Set the map. |
- mov(FieldOperand(result, HeapObject::kMapOffset), |
- Immediate(isolate()->factory()->heap_number_map())); |
+ mov(FieldOperand(result, HeapObject::kMapOffset), Immediate(map)); |
} |