| Index: src/ia32/lithium-codegen-ia32.cc
|
| diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc
|
| index 965dc4431d1f372ddc0fbd18c0c386303cc00db2..6f72fc5ee86e6107cd001b29224f01be9573dd3f 100644
|
| --- a/src/ia32/lithium-codegen-ia32.cc
|
| +++ b/src/ia32/lithium-codegen-ia32.cc
|
| @@ -2178,13 +2178,22 @@ void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
|
| Register context = ToRegister(instr->context());
|
| Register result = ToRegister(instr->result());
|
| __ mov(result, ContextOperand(context, instr->slot_index()));
|
| + if (instr->hydrogen()->RequiresHoleCheck()) {
|
| + __ cmp(result, factory()->the_hole_value());
|
| + DeoptimizeIf(equal, instr->environment());
|
| + }
|
| }
|
|
|
|
|
| void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
|
| Register context = ToRegister(instr->context());
|
| Register value = ToRegister(instr->value());
|
| - __ mov(ContextOperand(context, instr->slot_index()), value);
|
| + Operand target = ContextOperand(context, instr->slot_index());
|
| + if (instr->hydrogen()->RequiresHoleCheck()) {
|
| + __ cmp(target, factory()->the_hole_value());
|
| + DeoptimizeIf(equal, instr->environment());
|
| + }
|
| + __ mov(target, value);
|
| if (instr->hydrogen()->NeedsWriteBarrier()) {
|
| HType type = instr->hydrogen()->value()->type();
|
| SmiCheck check_needed =
|
|
|