Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index afd5ba51935a8dc110dd1ce859046945bb3a48e6..e381120ac9a7780bfc13a080c0ef8d20517f2700 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -5331,7 +5331,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(v0, result); |
} |