| Index: src/crankshaft/arm/lithium-arm.cc
|
| diff --git a/src/crankshaft/arm/lithium-arm.cc b/src/crankshaft/arm/lithium-arm.cc
|
| index 62aa9b2f208b67c9a701f38e7e52e4cf05645626..823f5a9f89a3133f203aabb1def733fa568119ba 100644
|
| --- a/src/crankshaft/arm/lithium-arm.cc
|
| +++ b/src/crankshaft/arm/lithium-arm.cc
|
| @@ -1975,7 +1975,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;
|
| }
|
|
|
|
|
| @@ -1989,7 +1994,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;
|
| }
|
|
|
|
|
|
|