Chromium Code Reviews| Index: src/arm/lithium-codegen-arm.cc |
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
| index 45dc6ff89696e37bd67bad8eb4be84a905822618..bc7c488c4f37cb15dde8615d5bd572b078cfd78d 100644 |
| --- a/src/arm/lithium-codegen-arm.cc |
| +++ b/src/arm/lithium-codegen-arm.cc |
| @@ -5566,12 +5566,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, MacroAssembler::NEW_SPACE); |
| __ bind(deferred->exit()); |
| if (FLAG_debug_code) { |
| @@ -5646,19 +5642,16 @@ 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()) { |
| + __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags, |
| + MacroAssembler::OLD_POINTER_SPACE); |
| + } else { |
| + __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags, |
| + MacroAssembler::NEW_SPACE); |
| + } |
| } else { |
| Register size = ToRegister(instr->size()); |
| - __ AllocateInNewSpace(size, |
| - result, |
| - scratch, |
| - scratch2, |
| - deferred->entry(), |
| + __ AllocateInNewSpace(size, result, scratch, scratch2, deferred->entry(), |
|
danno
2013/03/05 12:18:18
Seems like the above three __ Allocates can be com
Hannes Payer (out of office)
2013/03/11 17:16:31
I was able to combine the two Allocate calls if si
|
| flags); |
| } |
| @@ -5884,7 +5877,8 @@ 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, |
| + MacroAssembler::NEW_SPACE); |
| __ jmp(&allocated); |
| __ bind(&runtime_allocate); |
| @@ -5966,7 +5960,8 @@ 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, |
| + MacroAssembler::NEW_SPACE); |
| __ jmp(&allocated); |
| __ bind(&runtime_allocate); |