Index: src/crankshaft/x87/lithium-codegen-x87.cc |
diff --git a/src/crankshaft/x87/lithium-codegen-x87.cc b/src/crankshaft/x87/lithium-codegen-x87.cc |
index f4159a65b0c0c4bc12685e0b82f84236fe72a960..7444ff0e0e29e547135332dd0c610d1d9f483710 100644 |
--- a/src/crankshaft/x87/lithium-codegen-x87.cc |
+++ b/src/crankshaft/x87/lithium-codegen-x87.cc |
@@ -5456,6 +5456,30 @@ void LCodeGen::DoAllocate(LAllocate* instr) { |
} |
} |
+void LCodeGen::DoFastAllocate(LFastAllocate* instr) { |
Hannes Payer (out of office)
2016/05/11 07:44:41
Why do you move that piece of code? I would like t
|
+ DCHECK(instr->hydrogen()->IsAllocationFolded()); |
+ Register result = ToRegister(instr->result()); |
+ Register temp = ToRegister(instr->temp()); |
+ |
+ AllocationFlags flags = NO_ALLOCATION_FLAGS; |
+ if (instr->hydrogen()->MustAllocateDoubleAligned()) { |
+ flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); |
+ } |
+ if (instr->hydrogen()->IsOldSpaceAllocation()) { |
+ 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, temp, flags); |
+ } else { |
+ Register size = ToRegister(instr->size()); |
+ __ FastAllocate(size, result, temp, flags); |
+ } |
+ } |
+} |
void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
Register result = ToRegister(instr->result()); |
@@ -5513,31 +5537,6 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
} |
} |
-void LCodeGen::DoFastAllocate(LFastAllocate* instr) { |
- DCHECK(instr->hydrogen()->IsAllocationFolded()); |
- Register result = ToRegister(instr->result()); |
- Register temp = ToRegister(instr->temp()); |
- |
- AllocationFlags flags = NO_ALLOCATION_FLAGS; |
- if (instr->hydrogen()->MustAllocateDoubleAligned()) { |
- flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); |
- } |
- if (instr->hydrogen()->IsOldSpaceAllocation()) { |
- 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, temp, flags); |
- } else { |
- Register size = ToRegister(instr->size()); |
- __ FastAllocate(size, result, temp, flags); |
- } |
- } |
-} |
- |
void LCodeGen::DoTypeof(LTypeof* instr) { |
DCHECK(ToRegister(instr->context()).is(esi)); |