| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index 5e2e380ba8927688a9b2b4e11b58652991694b39..50da6497208502bcf9fa16e9d56bb503db7b18b2 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -2195,8 +2195,22 @@ void LCodeGen::DoLoadGlobal(LLoadGlobal* instr) {
|
|
|
| void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) {
|
| Register value = ToRegister(instr->InputAt(0));
|
| - __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell())));
|
| - __ str(value, FieldMemOperand(ip, JSGlobalPropertyCell::kValueOffset));
|
| + Register scratch = ToRegister(instr->TempAt(0));
|
| + Register scratch2 = scratch0();
|
| +
|
| + // 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.
|
| + __ mov(scratch, Operand(Handle<Object>(instr->hydrogen()->cell())));
|
| + __ ldr(scratch2,
|
| + FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset));
|
| + __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
|
| + __ cmp(scratch2, ip);
|
| + DeoptimizeIf(eq, instr->environment());
|
| +
|
| + // Store the value.
|
| + __ str(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset));
|
| }
|
|
|
|
|
|
|