Index: src/crankshaft/arm64/lithium-arm64.cc |
diff --git a/src/crankshaft/arm64/lithium-arm64.cc b/src/crankshaft/arm64/lithium-arm64.cc |
index 9258ff7706cf9f53012009a5b4b06f0c4cd6dee2..e5227e301f16fdbd9a1506c436ebcefe3fd882ef 100644 |
--- a/src/crankshaft/arm64/lithium-arm64.cc |
+++ b/src/crankshaft/arm64/lithium-arm64.cc |
@@ -1507,7 +1507,12 @@ LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* 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; |
} |
@@ -2093,7 +2098,11 @@ LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) { |
context = UseRegister(instr->context()); |
value = UseRegister(instr->value()); |
} |
- return new (zone()) LStoreContextSlot(context, value, temp); |
+ LInstruction* result = new(zone()) LStoreContextSlot(context, value, temp); |
+ if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
+ result = AssignEnvironment(result); |
+ } |
+ return result; |
} |