| Index: src/arm/macro-assembler-arm.cc
|
| diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
|
| index e0e77cfd338a0b334550c0ad3165487c50c3dd5f..8a531747097deb4f68f7e05736b42659fbe1b96c 100644
|
| --- a/src/arm/macro-assembler-arm.cc
|
| +++ b/src/arm/macro-assembler-arm.cc
|
| @@ -1671,13 +1671,12 @@ void MacroAssembler::Allocate(int object_size,
|
| }
|
|
|
|
|
| -void MacroAssembler::AllocateInNewSpace(Register object_size,
|
| - Register result,
|
| - Register scratch1,
|
| - Register scratch2,
|
| - Label* gc_required,
|
| - AllocationFlags flags) {
|
| - ASSERT((flags & PRETENURE_OLD_POINTER_SPACE) == 0);
|
| +void MacroAssembler::Allocate(Register object_size,
|
| + Register result,
|
| + Register scratch1,
|
| + Register scratch2,
|
| + Label* gc_required,
|
| + AllocationFlags flags) {
|
| if (!FLAG_inline_new) {
|
| if (emit_debug_code()) {
|
| // Trash the registers to simulate an allocation failure.
|
| @@ -1703,20 +1702,20 @@ void MacroAssembler::AllocateInNewSpace(Register object_size,
|
| // The values must be adjacent in memory to allow the use of LDM.
|
| // Also, assert that the registers are numbered such that the values
|
| // are loaded in the correct order.
|
| - ExternalReference new_space_allocation_top =
|
| - ExternalReference::new_space_allocation_top_address(isolate());
|
| - ExternalReference new_space_allocation_limit =
|
| - ExternalReference::new_space_allocation_limit_address(isolate());
|
| + ExternalReference allocation_top =
|
| + AllocationUtils::GetAllocationTopReference(isolate(), flags);
|
| + ExternalReference allocation_limit =
|
| + AllocationUtils::GetAllocationLimitReference(isolate(), flags);
|
| intptr_t top =
|
| - reinterpret_cast<intptr_t>(new_space_allocation_top.address());
|
| + reinterpret_cast<intptr_t>(allocation_top.address());
|
| intptr_t limit =
|
| - reinterpret_cast<intptr_t>(new_space_allocation_limit.address());
|
| + reinterpret_cast<intptr_t>(allocation_limit.address());
|
| ASSERT((limit - top) == kPointerSize);
|
| ASSERT(result.code() < ip.code());
|
|
|
| // Set up allocation top address.
|
| Register topaddr = scratch1;
|
| - mov(topaddr, Operand(new_space_allocation_top));
|
| + mov(topaddr, Operand(allocation_top));
|
|
|
| // This code stores a temporary value in ip. This is OK, as the code below
|
| // does not need ip for implicit literal generation.
|
| @@ -1739,6 +1738,7 @@ void MacroAssembler::AllocateInNewSpace(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.
|
| + ASSERT((flags & PRETENURE_OLD_POINTER_SPACE) == 0);
|
| ASSERT(kPointerAlignment * 2 == kDoubleAlignment);
|
| and_(scratch2, result, Operand(kDoubleAlignmentMask), SetCC);
|
| Label aligned;
|
| @@ -1809,12 +1809,12 @@ void MacroAssembler::AllocateTwoByteString(Register result,
|
| and_(scratch1, scratch1, Operand(~kObjectAlignmentMask));
|
|
|
| // Allocate two-byte string in new space.
|
| - AllocateInNewSpace(scratch1,
|
| - result,
|
| - scratch2,
|
| - scratch3,
|
| - gc_required,
|
| - TAG_OBJECT);
|
| + Allocate(scratch1,
|
| + result,
|
| + scratch2,
|
| + scratch3,
|
| + gc_required,
|
| + TAG_OBJECT);
|
|
|
| // Set the map, length and hash field.
|
| InitializeNewString(result,
|
| @@ -1840,12 +1840,12 @@ void MacroAssembler::AllocateAsciiString(Register result,
|
| and_(scratch1, scratch1, Operand(~kObjectAlignmentMask));
|
|
|
| // Allocate ASCII string in new space.
|
| - AllocateInNewSpace(scratch1,
|
| - result,
|
| - scratch2,
|
| - scratch3,
|
| - gc_required,
|
| - TAG_OBJECT);
|
| + Allocate(scratch1,
|
| + result,
|
| + scratch2,
|
| + scratch3,
|
| + gc_required,
|
| + TAG_OBJECT);
|
|
|
| // Set the map, length and hash field.
|
| InitializeNewString(result,
|
|
|