Index: src/mips/macro-assembler-mips.cc |
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc |
index 926b3bfbb4e690b8b43905ee72b8c94173581ec0..ca83174e5928490d9dc57007fccc42712368f7b5 100644 |
--- a/src/mips/macro-assembler-mips.cc |
+++ b/src/mips/macro-assembler-mips.cc |
@@ -3215,7 +3215,8 @@ void MacroAssembler::AllocateHeapNumber(Register result, |
Register scratch1, |
Register scratch2, |
Register heap_number_map, |
- Label* need_gc) { |
+ Label* need_gc, |
+ TaggingMode tagging_mode) { |
// Allocate an object in the heap for the heap number and tag it as a heap |
// object. |
AllocateInNewSpace(HeapNumber::kSize, |
@@ -3223,11 +3224,16 @@ void MacroAssembler::AllocateHeapNumber(Register result, |
scratch1, |
scratch2, |
need_gc, |
- 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); |
- sw(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset)); |
+ if (tagging_mode == TAG_RESULT) { |
+ sw(heap_number_map, FieldMemOperand(result, HeapObject::kMapOffset)); |
+ } else { |
+ sw(heap_number_map, MemOperand(result, HeapObject::kMapOffset)); |
+ } |
} |