Index: src/crankshaft/ppc/lithium-ppc.cc |
diff --git a/src/crankshaft/ppc/lithium-ppc.cc b/src/crankshaft/ppc/lithium-ppc.cc |
index 01356a4666930f3b747ba193aecc7d2c4b174daa..040454ba241a6fee8bbbf3317d18b30f5487dfd0 100644 |
--- a/src/crankshaft/ppc/lithium-ppc.cc |
+++ b/src/crankshaft/ppc/lithium-ppc.cc |
@@ -2319,13 +2319,18 @@ LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) { |
LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) { |
- info()->MarkAsDeferredCalling(); |
- LOperand* context = UseAny(instr->context()); |
LOperand* size = UseRegisterOrConstant(instr->size()); |
LOperand* temp1 = TempRegister(); |
LOperand* temp2 = TempRegister(); |
- LAllocate* result = new (zone()) LAllocate(context, size, temp1, temp2); |
- return AssignPointerMap(DefineAsRegister(result)); |
+ if (instr->IsAllocationFolded()) { |
+ LFastAllocate* result = new (zone()) LFastAllocate(size, temp1, temp2); |
+ return DefineAsRegister(result); |
+ } else { |
+ info()->MarkAsDeferredCalling(); |
+ LOperand* context = UseAny(instr->context()); |
+ LAllocate* result = new (zone()) LAllocate(context, size, temp1, temp2); |
+ return AssignPointerMap(DefineAsRegister(result)); |
+ } |
} |