Index: src/crankshaft/arm/lithium-arm.cc |
diff --git a/src/crankshaft/arm/lithium-arm.cc b/src/crankshaft/arm/lithium-arm.cc |
index 2e0f939d4f21c170eb29468363d4fbb433070176..d9ed7c3729f42e74bc67f12e78d2ac068bb0163d 100644 |
--- a/src/crankshaft/arm/lithium-arm.cc |
+++ b/src/crankshaft/arm/lithium-arm.cc |
@@ -2351,13 +2351,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)); |
+ } |
} |