| Index: src/arm/macro-assembler-arm.cc
|
| diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
|
| index e741ff7ea6d53236a9a2394494e99e061bd66447..fe24f45ef6bff1b62611f0aab15288015f31227d 100644
|
| --- a/src/arm/macro-assembler-arm.cc
|
| +++ b/src/arm/macro-assembler-arm.cc
|
| @@ -2037,7 +2037,7 @@ void MacroAssembler::Allocate(int object_size,
|
| // Align the next allocation. Storing the filler map without checking top is
|
| // safe in new-space because the limit of the heap is aligned there.
|
| STATIC_ASSERT(kPointerAlignment * 2 == kDoubleAlignment);
|
| - and_(result_end, result, Operand(kDoubleAlignmentMask), SetCC);
|
| + and_(result_end, result, Operand(kDoubleAlignmentMaskTagged), SetCC);
|
| Label aligned;
|
| b(eq, &aligned);
|
| if ((flags & PRETENURE) != 0) {
|
| @@ -2045,7 +2045,8 @@ void MacroAssembler::Allocate(int object_size,
|
| b(hs, gc_required);
|
| }
|
| mov(result_end, Operand(isolate()->factory()->one_pointer_filler_map()));
|
| - str(result_end, MemOperand(result, kDoubleSize / 2, PostIndex));
|
| + str(result_end, MemOperand(result, -kHeapObjectTag));
|
| + add(result, result, Operand(kDoubleSize / 2));
|
| bind(&aligned);
|
| }
|
|
|
| @@ -2078,9 +2079,6 @@ void MacroAssembler::Allocate(int object_size,
|
| // The top pointer is not updated for allocation folding dominators.
|
| str(result_end, MemOperand(top_address));
|
| }
|
| -
|
| - // Tag object.
|
| - add(result, result, Operand(kHeapObjectTag));
|
| }
|
|
|
|
|
| @@ -2143,7 +2141,7 @@ void MacroAssembler::Allocate(Register object_size, Register result,
|
| // Align the next allocation. Storing the filler map without checking top is
|
| // safe in new-space because the limit of the heap is aligned there.
|
| DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
|
| - and_(result_end, result, Operand(kDoubleAlignmentMask), SetCC);
|
| + and_(result_end, result, Operand(kDoubleAlignmentMaskTagged), SetCC);
|
| Label aligned;
|
| b(eq, &aligned);
|
| if ((flags & PRETENURE) != 0) {
|
| @@ -2151,7 +2149,8 @@ void MacroAssembler::Allocate(Register object_size, Register result,
|
| b(hs, gc_required);
|
| }
|
| mov(result_end, Operand(isolate()->factory()->one_pointer_filler_map()));
|
| - str(result_end, MemOperand(result, kDoubleSize / 2, PostIndex));
|
| + str(result_end, MemOperand(result, -kHeapObjectTag));
|
| + add(result, result, Operand(kDoubleSize / 2));
|
| bind(&aligned);
|
| }
|
|
|
| @@ -2170,15 +2169,12 @@ void MacroAssembler::Allocate(Register object_size, Register result,
|
| // Update allocation top. result temporarily holds the new top.
|
| if (emit_debug_code()) {
|
| tst(result_end, Operand(kObjectAlignmentMask));
|
| - Check(eq, kUnalignedAllocationInNewSpace);
|
| + Check(ne, kUnalignedAllocationInNewSpace);
|
| }
|
| if ((flags & ALLOCATION_FOLDING_DOMINATOR) == 0) {
|
| // The top pointer is not updated for allocation folding dominators.
|
| str(result_end, MemOperand(top_address));
|
| }
|
| -
|
| - // Tag object.
|
| - add(result, result, Operand(kHeapObjectTag));
|
| }
|
|
|
| void MacroAssembler::FastAllocate(Register object_size, Register result,
|
| @@ -2201,11 +2197,12 @@ void MacroAssembler::FastAllocate(Register object_size, Register result,
|
| // Align the next allocation. Storing the filler map without checking top is
|
| // safe in new-space because the limit of the heap is aligned there.
|
| DCHECK(kPointerAlignment * 2 == kDoubleAlignment);
|
| - and_(result_end, result, Operand(kDoubleAlignmentMask), SetCC);
|
| + and_(result_end, result, Operand(kDoubleAlignmentMaskTagged), SetCC);
|
| Label aligned;
|
| b(eq, &aligned);
|
| mov(result_end, Operand(isolate()->factory()->one_pointer_filler_map()));
|
| - str(result_end, MemOperand(result, kDoubleSize / 2, PostIndex));
|
| + str(result_end, MemOperand(result, -kHeapObjectTag));
|
| + add(result, result, Operand(kDoubleSize / 2));
|
| bind(&aligned);
|
| }
|
|
|
| @@ -2220,12 +2217,10 @@ void MacroAssembler::FastAllocate(Register object_size, Register result,
|
| // Update allocation top. result temporarily holds the new top.
|
| if (emit_debug_code()) {
|
| tst(result_end, Operand(kObjectAlignmentMask));
|
| - Check(eq, kUnalignedAllocationInNewSpace);
|
| + Check(ne, kUnalignedAllocationInNewSpace);
|
| }
|
| // The top pointer is not updated for allocation folding dominators.
|
| str(result_end, MemOperand(top_address));
|
| -
|
| - add(result, result, Operand(kHeapObjectTag));
|
| }
|
|
|
| void MacroAssembler::FastAllocate(int object_size, Register result,
|
| @@ -2253,11 +2248,12 @@ void MacroAssembler::FastAllocate(int object_size, Register result,
|
| // Align the next allocation. Storing the filler map without checking top is
|
| // safe in new-space because the limit of the heap is aligned there.
|
| STATIC_ASSERT(kPointerAlignment * 2 == kDoubleAlignment);
|
| - and_(result_end, result, Operand(kDoubleAlignmentMask), SetCC);
|
| + and_(result_end, result, Operand(kDoubleAlignmentMaskTagged), SetCC);
|
| Label aligned;
|
| b(eq, &aligned);
|
| mov(result_end, Operand(isolate()->factory()->one_pointer_filler_map()));
|
| - str(result_end, MemOperand(result, kDoubleSize / 2, PostIndex));
|
| + str(result_end, MemOperand(result, -kHeapObjectTag));
|
| + add(result, result, Operand(kDoubleSize / 2));
|
| bind(&aligned);
|
| }
|
|
|
| @@ -2285,8 +2281,6 @@ void MacroAssembler::FastAllocate(int object_size, Register result,
|
|
|
| // The top pointer is not updated for allocation folding dominators.
|
| str(result_end, MemOperand(top_address));
|
| -
|
| - add(result, result, Operand(kHeapObjectTag));
|
| }
|
|
|
| void MacroAssembler::AllocateTwoByteString(Register result,
|
|
|