Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 29fe10994be64f5861ee455ce67e3842ddc6962b..d35bfc9a2b60abd73a23064903f9d2d14b642d70 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -1911,7 +1911,19 @@ void LCodeGen::DoLoadGlobal(LLoadGlobal* instr) { |
void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { |
Register value = ToRegister(instr->InputAt(0)); |
- __ mov(Operand::Cell(instr->hydrogen()->cell()), value); |
+ Operand cell_operand = Operand::Cell(instr->hydrogen()->cell()); |
+ |
+ // If the cell we are storing to contains the hole it could have |
+ // been deleted from the property dictionary. In that case, we need |
+ // to update the property details in the property dictionary to mark |
+ // it as no longer deleted. We deoptimize in that case. |
+ if (instr->hydrogen()->check_hole_value()) { |
+ __ cmp(cell_operand, Factory::the_hole_value()); |
+ DeoptimizeIf(equal, instr->environment()); |
+ } |
+ |
+ // Store the value. |
+ __ mov(cell_operand, value); |
} |