| Index: src/mips/lithium-mips.cc
|
| diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc
|
| index c2f89867d77577a7a7b59d19209d03466647d9a5..bf5e13ce01b54ce71d91025f73790a316c73ef21 100644
|
| --- a/src/mips/lithium-mips.cc
|
| +++ b/src/mips/lithium-mips.cc
|
| @@ -552,6 +552,11 @@ LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) {
|
| }
|
|
|
|
|
| +LOperand* LChunkBuilder::UseConstant(HValue* value) {
|
| + return chunk_->DefineConstantOperand(HConstant::cast(value));
|
| +}
|
| +
|
| +
|
| LOperand* LChunkBuilder::UseAny(HValue* value) {
|
| return value->IsConstant()
|
| ? chunk_->DefineConstantOperand(HConstant::cast(value))
|
| @@ -2253,7 +2258,9 @@ LInstruction* LChunkBuilder::DoAllocateObject(HAllocateObject* instr) {
|
|
|
| LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) {
|
| info()->MarkAsDeferredCalling();
|
| - LOperand* size = UseTempRegister(instr->size());
|
| + LOperand* size = instr->size()->IsConstant()
|
| + ? UseConstant(instr->size())
|
| + : UseTempRegister(instr->size());
|
| LOperand* temp1 = TempRegister();
|
| LOperand* temp2 = TempRegister();
|
| LAllocate* result = new(zone()) LAllocate(size, temp1, temp2);
|
|
|