Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index b74d09deaa6aef8e9c06fc7290f2be6636f1d405..8c6246b0ba1e9f50905dc5e7669ce8a570469a20 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -3124,7 +3124,8 @@ void MacroAssembler::AllocateHeapNumber(Register result, |
Register scratch1, |
Register scratch2, |
Register heap_number_map, |
- Label* gc_required) { |
+ Label* gc_required, |
+ TaggingMode tagging_mode) { |
// Allocate an object in the heap for the heap number and tag it as a heap |
// object. |
AllocateInNewSpace(HeapNumber::kSize, |
@@ -3132,11 +3133,16 @@ void MacroAssembler::AllocateHeapNumber(Register result, |
scratch1, |
scratch2, |
gc_required, |
- TAG_OBJECT); |
+ tagging_mode == TAG_RESULT ? TAG_OBJECT : |
+ NO_ALLOCATION_FLAGS); |
// Store heap number map in the allocated object. |
AssertRegisterIsRoot(heap_number_map, Heap::kHeapNumberMapRootIndex); |
- str(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset)); |
+ if (tagging_mode == TAG_RESULT) { |
+ str(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset)); |
+ } else { |
+ str(heap_number_map, MemOperand(result, HeapObject::kMapOffset)); |
+ } |
} |