Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index f350b07d5bfc64ea2acb0330bcb8569eefdfeaa8..756bd655d0572e4b3b8c163787ef68a2dad4460a 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -5145,7 +5145,11 @@ void LCodeGen::DoAllocate(LAllocate* instr) { |
if (instr->size()->IsConstantOperand()) { |
int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
- __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
+ if (size <= Page::kMaxRegularHeapObjectSize) { |
+ __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
+ } else { |
+ __ jmp(deferred->entry()); |
+ } |
} else { |
Register size = ToRegister(instr->size()); |
__ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |