Index: src/crankshaft/mips64/lithium-mips64.cc |
diff --git a/src/crankshaft/mips64/lithium-mips64.cc b/src/crankshaft/mips64/lithium-mips64.cc |
index 3ad08761f941701c441fad8c6c9d7b0fadec7cdf..fd0ebc82062917df4a2b3fc0f4a92db3a2a17020 100644 |
--- a/src/crankshaft/mips64/lithium-mips64.cc |
+++ b/src/crankshaft/mips64/lithium-mips64.cc |
@@ -1925,7 +1925,12 @@ LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { |
LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
LOperand* context = UseRegisterAtStart(instr->value()); |
- return DefineAsRegister(new (zone()) LLoadContextSlot(context)); |
+ LInstruction* result = |
+ DefineAsRegister(new(zone()) LLoadContextSlot(context)); |
+ if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
+ result = AssignEnvironment(result); |
+ } |
+ return result; |
} |
@@ -1939,7 +1944,11 @@ LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { |
context = UseRegister(instr->context()); |
value = UseRegister(instr->value()); |
} |
- return new (zone()) LStoreContextSlot(context, value); |
+ LInstruction* result = new(zone()) LStoreContextSlot(context, value); |
+ if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
+ result = AssignEnvironment(result); |
+ } |
+ return result; |
} |