Index: src/arm/lithium-arm.cc |
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
index ce3a66f9c3fce0953f6d80a701087e49cb3aa2ec..c458138380bd29602d23280e58156ae8a92b8568 100644 |
--- a/src/arm/lithium-arm.cc |
+++ b/src/arm/lithium-arm.cc |
@@ -1602,7 +1602,14 @@ LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) { |
LInstruction* LChunkBuilder::DoStoreGlobal(HStoreGlobal* instr) { |
- return new LStoreGlobal(UseRegisterAtStart(instr->value())); |
+ if (instr->check_hole_value()) { |
+ LOperand* temp = TempRegister(); |
+ LOperand* value = UseRegister(instr->value()); |
+ return AssignEnvironment(new LStoreGlobal(value, temp)); |
+ } else { |
+ LOperand* value = UseRegisterAtStart(instr->value()); |
+ return new LStoreGlobal(value, NULL); |
+ } |
} |