Index: src/a64/lithium-codegen-a64.cc |
diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc |
index 462db001a5d40be2b528b40d11ee52870c3a9b0b..2bad671197fec3743a3ece7c0d1815a2a90a55d1 100644 |
--- a/src/a64/lithium-codegen-a64.cc |
+++ b/src/a64/lithium-codegen-a64.cc |
@@ -1486,7 +1486,11 @@ void LCodeGen::DoAllocate(LAllocate* instr) { |
if (instr->size()->IsConstantOperand()) { |
int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
- __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); |
+ if (size <= Page::kMaxRegularHeapObjectSize) { |
+ __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); |
+ } else { |
+ __ B(deferred->entry()); |
+ } |
} else { |
Register size = ToRegister32(instr->size()); |
__ Sxtw(size.X(), size); |