Index: src/mips/lithium-mips.cc |
diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc |
index f963ec9e3f4fccb43b6b069e0313cefa64300637..1040b28ff690883dde55e1cfa3e7480bd317d635 100644 |
--- a/src/mips/lithium-mips.cc |
+++ b/src/mips/lithium-mips.cc |
@@ -1782,11 +1782,12 @@ LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) { |
LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) { |
- LOperand* temp = TempRegister(); |
- LOperand* value = UseTempRegister(instr->value()); |
- LInstruction* result = new LStoreGlobalCell(value, temp); |
- if (instr->RequiresHoleCheck()) result = AssignEnvironment(result); |
- return result; |
+ LOperand* value = UseRegister(instr->value()); |
+ // Use a temp to check the value in the cell in the case where we perform |
+ // a hole check. |
+ return instr->RequiresHoleCheck() |
+ ? AssignEnvironment(new LStoreGlobalCell(value, TempRegister())) |
+ : new LStoreGlobalCell(value, NULL); |
} |