Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 109c25ad5e41a4867af4a924615343495304161f..dcd841a4b33f52c41ba6f76a678b995440f02532 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -5197,8 +5197,12 @@ void LCodeGen::DoAllocate(LAllocate* instr) { |
flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); |
} |
if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { |
+ ASSERT(!instr->hydrogen()->CanAllocateInOldDataSpace()); |
flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); |
+ } else if (instr->hydrogen()->CanAllocateInOldDataSpace()) { |
+ flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); |
} |
+ |
if (instr->size()->IsConstantOperand()) { |
int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
__ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
@@ -5231,11 +5235,12 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
} |
if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { |
- CallRuntimeFromDeferred( |
- Runtime::kAllocateInOldPointerSpace, 1, instr); |
+ ASSERT(!instr->hydrogen()->CanAllocateInOldDataSpace()); |
+ CallRuntimeFromDeferred(Runtime::kAllocateInOldPointerSpace, 1, instr); |
+ } else if (instr->hydrogen()->CanAllocateInOldDataSpace()) { |
+ CallRuntimeFromDeferred(Runtime::kAllocateInOldDataSpace, 1, instr); |
} else { |
- CallRuntimeFromDeferred( |
- Runtime::kAllocateInNewSpace, 1, instr); |
+ CallRuntimeFromDeferred(Runtime::kAllocateInNewSpace, 1, instr); |
} |
__ StoreToSafepointRegisterSlot(result, rax); |
} |