Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 4ae660380ab620e33ce1f20b572227e0ba705ca5..9d5985f3c936cda2ca91674f8196275a983ce047 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -5461,12 +5461,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, |
- no_reg, |
- scratch, |
- deferred->entry(), |
- TAG_OBJECT); |
+ __ Allocate(instance_size, result, no_reg, scratch, deferred->entry(), |
+ TAG_OBJECT); |
__ bind(deferred->exit()); |
if (FLAG_debug_code) { |
@@ -5556,7 +5552,10 @@ void LCodeGen::DoAllocate(LAllocate* instr) { |
} |
if (instr->size()->IsConstantOperand()) { |
int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
- __ AllocateInNewSpace(size, result, temp, no_reg, deferred->entry(), flags); |
+ if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { |
+ flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); |
+ } |
+ __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
} else { |
Register size = ToRegister(instr->size()); |
__ AllocateInNewSpace(size, result, temp, no_reg, deferred->entry(), flags); |
@@ -5795,7 +5794,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, eax, ecx, edx, &runtime_allocate, TAG_OBJECT); |
+ __ Allocate(size, eax, ecx, edx, &runtime_allocate, TAG_OBJECT); |
__ jmp(&allocated); |
__ bind(&runtime_allocate); |
@@ -5885,7 +5884,7 @@ void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) { |
__ bind(&materialized); |
int size = JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize; |
Label allocated, runtime_allocate; |
- __ AllocateInNewSpace(size, eax, ecx, edx, &runtime_allocate, TAG_OBJECT); |
+ __ Allocate(size, eax, ecx, edx, &runtime_allocate, TAG_OBJECT); |
__ jmp(&allocated); |
__ bind(&runtime_allocate); |