Index: src/crankshaft/arm64/lithium-codegen-arm64.cc |
diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc |
index ddc6ad755f1b58616d26f36426dee9f349c69db3..dbe6c051e57aae25e1abfc0cd13263faefbf3e3f 100644 |
--- a/src/crankshaft/arm64/lithium-codegen-arm64.cc |
+++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc |
@@ -1429,10 +1429,7 @@ void LCodeGen::DoAllocate(LAllocate* instr) { |
if (instr->hydrogen()->IsAllocationFoldingDominator()) { |
flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); |
} |
- |
- if (instr->hydrogen()->IsAllocationFolded()) { |
- flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDED); |
- } |
+ DCHECK(!instr->hydrogen()->IsAllocationFolded()); |
if (instr->size()->IsConstantOperand()) { |
int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
@@ -1517,11 +1514,12 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
void LCodeGen::DoFastAllocate(LFastAllocate* instr) { |
DCHECK(instr->hydrogen()->IsAllocationFolded()); |
+ DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); |
Register result = ToRegister(instr->result()); |
Register scratch1 = ToRegister(instr->temp1()); |
Register scratch2 = ToRegister(instr->temp2()); |
- AllocationFlags flags = NO_ALLOCATION_FLAGS; |
+ AllocationFlags flags = ALLOCATION_FOLDED; |
if (instr->hydrogen()->MustAllocateDoubleAligned()) { |
flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); |
} |
@@ -1529,15 +1527,13 @@ void LCodeGen::DoFastAllocate(LFastAllocate* instr) { |
DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
flags = static_cast<AllocationFlags>(flags | PRETENURE); |
} |
- if (!instr->hydrogen()->IsAllocationFoldingDominator()) { |
- if (instr->size()->IsConstantOperand()) { |
- int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
- CHECK(size <= Page::kMaxRegularHeapObjectSize); |
- __ FastAllocate(size, result, scratch1, scratch2, flags); |
- } else { |
- Register size = ToRegister(instr->size()); |
- __ FastAllocate(size, result, scratch1, scratch2, flags); |
- } |
+ if (instr->size()->IsConstantOperand()) { |
+ int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
+ CHECK(size <= Page::kMaxRegularHeapObjectSize); |
+ __ FastAllocate(size, result, scratch1, scratch2, flags); |
+ } else { |
+ Register size = ToRegister(instr->size()); |
+ __ FastAllocate(size, result, scratch1, scratch2, flags); |
} |
} |