Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 72091c3e4d371e6258e83317f2177b306c25cab3..082a480ee85937092785c2f8fcaf5a4c42fd25ef 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -5084,7 +5084,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); |