| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index 81976a6b53f9d14cb081bf16d86545a3e9495d45..89591d04a41107c90913ce4727dc950e3e78def1 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -5024,12 +5024,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) {
|
| @@ -5118,7 +5114,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);
|
| @@ -5339,7 +5338,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, rax, rcx, rdx, &runtime_allocate, TAG_OBJECT);
|
| + __ Allocate(size, rax, rcx, rdx, &runtime_allocate, TAG_OBJECT);
|
| __ jmp(&allocated);
|
|
|
| __ bind(&runtime_allocate);
|
| @@ -5426,7 +5425,7 @@ void LCodeGen::DoRegExpLiteral(LRegExpLiteral* instr) {
|
| __ bind(&materialized);
|
| int size = JSRegExp::kSize + JSRegExp::kInObjectFieldCount * kPointerSize;
|
| Label allocated, runtime_allocate;
|
| - __ AllocateInNewSpace(size, rax, rcx, rdx, &runtime_allocate, TAG_OBJECT);
|
| + __ Allocate(size, rax, rcx, rdx, &runtime_allocate, TAG_OBJECT);
|
| __ jmp(&allocated);
|
|
|
| __ bind(&runtime_allocate);
|
|
|