Index: src/crankshaft/mips/lithium-mips.cc |
diff --git a/src/crankshaft/mips/lithium-mips.cc b/src/crankshaft/mips/lithium-mips.cc |
index 2a9f6df2539049e1fe280afe4faa62540c2ba4a7..f9c68e0b18290f1f53548ae56ca07d2c8567e369 100644 |
--- a/src/crankshaft/mips/lithium-mips.cc |
+++ b/src/crankshaft/mips/lithium-mips.cc |
@@ -2298,13 +2298,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)); |
+ } |
} |