Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index a56744bf597a245a0afed0b4b1a64b38d1a4cd0c..974b56959fd5237621f1090158c228e11a681e28 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -1732,12 +1732,16 @@ void MacroAssembler::Allocate(int object_size, |
if ((flags & DOUBLE_ALIGNMENT) != 0) { |
// Align the next allocation. Storing the filler map without checking top is |
- // always safe because the limit of the heap is always aligned. |
+ // safe in new-space because the limit of the heap is aligned there. |
ASSERT((flags & PRETENURE_OLD_POINTER_SPACE) == 0); |
ASSERT(kPointerAlignment * 2 == kDoubleAlignment); |
and_(scratch2, result, Operand(kDoubleAlignmentMask), SetCC); |
Label aligned; |
b(eq, &aligned); |
+ if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) { |
+ cmp(result, Operand(ip)); |
+ b(hs, gc_required); |
+ } |
mov(scratch2, Operand(isolate()->factory()->one_pointer_filler_map())); |
str(scratch2, MemOperand(result, kDoubleSize / 2, PostIndex)); |
bind(&aligned); |
@@ -1830,12 +1834,16 @@ void MacroAssembler::Allocate(Register object_size, |
if ((flags & DOUBLE_ALIGNMENT) != 0) { |
// Align the next allocation. Storing the filler map without checking top is |
- // always safe because the limit of the heap is always aligned. |
+ // safe in new-space because the limit of the heap is aligned there. |
ASSERT((flags & PRETENURE_OLD_POINTER_SPACE) == 0); |
ASSERT(kPointerAlignment * 2 == kDoubleAlignment); |
and_(scratch2, result, Operand(kDoubleAlignmentMask), SetCC); |
Label aligned; |
b(eq, &aligned); |
+ if ((flags & PRETENURE_OLD_DATA_SPACE) != 0) { |
+ cmp(result, Operand(ip)); |
+ b(hs, gc_required); |
+ } |
mov(scratch2, Operand(isolate()->factory()->one_pointer_filler_map())); |
str(scratch2, MemOperand(result, kDoubleSize / 2, PostIndex)); |
bind(&aligned); |