| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index b35dc7c145d884c074bd6582419293f7015fd954..7e09682656180801d68dbeebadcdb976b5f52ef2 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -2303,13 +2303,32 @@ void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
|
| Register context = ToRegister(instr->context());
|
| Register result = ToRegister(instr->result());
|
| __ ldr(result, ContextOperand(context, instr->slot_index()));
|
| + if (instr->RequiresHoleCheck()) {
|
| + Label is_not_hole;
|
| + __ cmp(result, Operand(factory()->the_hole_value()));
|
| + __ b(ne, &is_not_hole);
|
| +
|
| + __ mov(result, Operand(factory()->undefined_value()));
|
| +
|
| + __ bind(&is_not_hole);
|
| + }
|
| }
|
|
|
|
|
| void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
|
| Register context = ToRegister(instr->context());
|
| Register value = ToRegister(instr->value());
|
| + Register scratch = scratch0();
|
| MemOperand target = ContextOperand(context, instr->slot_index());
|
| +
|
| + Label skip_assignment;
|
| +
|
| + if (instr->RequiresHoleCheck()) {
|
| + __ ldr(scratch, target);
|
| + __ cmp(scratch, Operand(factory()->the_hole_value()));
|
| + __ b(ne, &skip_assignment);
|
| + }
|
| +
|
| __ str(value, target);
|
| if (instr->hydrogen()->NeedsWriteBarrier()) {
|
| HType type = instr->hydrogen()->value()->type();
|
| @@ -2318,12 +2337,14 @@ void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
|
| __ RecordWriteContextSlot(context,
|
| target.offset(),
|
| value,
|
| - scratch0(),
|
| + scratch,
|
| kLRHasBeenSaved,
|
| kSaveFPRegs,
|
| EMIT_REMEMBERED_SET,
|
| check_needed);
|
| }
|
| +
|
| + __ bind(&skip_assignment);
|
| }
|
|
|
|
|
|
|