| Index: src/crankshaft/ppc/lithium-ppc.cc
|
| diff --git a/src/crankshaft/ppc/lithium-ppc.cc b/src/crankshaft/ppc/lithium-ppc.cc
|
| index f45c31c914b5083faae5afb3d6c794bdf9fef49f..75aec2f86dd4e816683011cdadc186e863d963ba 100644
|
| --- a/src/crankshaft/ppc/lithium-ppc.cc
|
| +++ b/src/crankshaft/ppc/lithium-ppc.cc
|
| @@ -1950,7 +1950,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;
|
| }
|
|
|
|
|
| @@ -1964,7 +1969,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;
|
| }
|
|
|
|
|
|
|