Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 19cef6bd114675d676129043e224aa5871ddc3ed..5d02613d0f81e2d76329983931baae19c7b2193a 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -5472,7 +5472,13 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); |
__ SmiTag(size, size); |
__ push(size); |
- CallRuntimeFromDeferred(Runtime::kAllocateInNewSpace, 1, instr); |
+ if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { |
+ CallRuntimeFromDeferred( |
+ Runtime::kAllocateInOldPointerSpace, 1, instr); |
+ } else { |
+ CallRuntimeFromDeferred( |
+ Runtime::kAllocateInNewSpace, 1, instr); |
+ } |
__ StoreToSafepointRegisterSlot(r0, result); |
} |