Index: src/crankshaft/s390/lithium-s390.cc |
diff --git a/src/crankshaft/s390/lithium-s390.cc b/src/crankshaft/s390/lithium-s390.cc |
index facf257f927b71815306bbd9396166b4cb8d3081..bf5f48b9619446be13c2b5b159c88d954d6f7f43 100644 |
--- a/src/crankshaft/s390/lithium-s390.cc |
+++ b/src/crankshaft/s390/lithium-s390.cc |
@@ -2124,13 +2124,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)); |
+ } |
} |
LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) { |