Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index d66b0d6d82243f988dde71eb425eb8ba5c8e0965..9f2b94def43dc0d57fa5f60ed03119e58ffeff9f 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -5589,12 +5589,8 @@ void LCodeGen::DoAllocateObject(LAllocateObject* instr) { |
// the constructor's prototype changes, but instance size and property |
// counts remain unchanged (if slack tracking finished). |
ASSERT(!constructor->shared()->IsInobjectSlackTrackingInProgress()); |
- __ AllocateInNewSpace(instance_size, |
- result, |
- scratch, |
- scratch2, |
- deferred->entry(), |
- TAG_OBJECT); |
+ __ Allocate(instance_size, result, scratch, scratch2, deferred->entry(), |
+ TAG_OBJECT); |
__ bind(deferred->exit()); |
if (FLAG_debug_code) { |
@@ -5669,12 +5665,10 @@ void LCodeGen::DoAllocate(LAllocate* instr) { |
} |
if (instr->size()->IsConstantOperand()) { |
int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
- __ AllocateInNewSpace(size, |
- result, |
- scratch, |
- scratch2, |
- deferred->entry(), |
- flags); |
+ if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { |
+ flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); |
+ } |
+ __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); |
} else { |
Register size = ToRegister(instr->size()); |
__ AllocateInNewSpace(size, |
@@ -5907,7 +5901,7 @@ void LCodeGen::DoFastLiteral(LFastLiteral* instr) { |
// Allocate all objects that are part of the literal in one big |
// allocation. This avoids multiple limit checks. |
Label allocated, runtime_allocate; |
- __ AllocateInNewSpace(size, r0, r2, r3, &runtime_allocate, TAG_OBJECT); |
+ __ Allocate(size, r0, r2, r3, &runtime_allocate, TAG_OBJECT); |
__ jmp(&allocated); |
__ bind(&runtime_allocate); |
@@ -5989,7 +5983,7 @@ void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { |
int size = JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize; |
Label allocated, runtime_allocate; |
- __ AllocateInNewSpace(size, r0, r2, r3, &runtime_allocate, TAG_OBJECT); |
+ __ Allocate(size, r0, r2, r3, &runtime_allocate, TAG_OBJECT); |
__ jmp(&allocated); |
__ bind(&runtime_allocate); |