Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index b3cb507640d9ffc52a09189f2652c6ad7e3ab836..8276bc1fbc9ea284c453a80995a52d2bdcefda67 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -1683,14 +1683,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)); |
} |