Index: src/arm/lithium-arm.cc |
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
index 31f608345be255fceb5b5ab066677fe3835535f5..d1b6422e970dd4b068f5de64b5793e1e76dc270e 100644 |
--- a/src/arm/lithium-arm.cc |
+++ b/src/arm/lithium-arm.cc |
@@ -1798,7 +1798,8 @@ LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) { |
LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
LOperand* context = UseRegisterAtStart(instr->value()); |
- return DefineAsRegister(new LLoadContextSlot(context)); |
+ LInstruction* result = DefineAsRegister(new LLoadContextSlot(context)); |
+ return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; |
} |
@@ -1812,7 +1813,8 @@ LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { |
context = UseRegister(instr->context()); |
value = UseRegister(instr->value()); |
} |
- return new LStoreContextSlot(context, value); |
+ LInstruction* result = new LStoreContextSlot(context, value); |
+ return instr->RequiresHoleCheck() ? AssignEnvironment(result) : result; |
} |