Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index 71405b6344aedf410dcc52743e2eec2d59f2637a..6cb4e47f19a07a58c886ce04e9b662ee1fc3b8b8 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -2167,7 +2167,17 @@ void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
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()) { |
+ __ lw(scratch, target); |
+ __ Branch(&skip_assignment, ne, scratch, |
+ Operand(factory()->the_hole_value())); |
+ } |
+ |
__ sw(value, target); |
if (instr->hydrogen()->NeedsWriteBarrier()) { |
HType type = instr->hydrogen()->value()->type(); |
@@ -2182,6 +2192,8 @@ void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { |
EMIT_REMEMBERED_SET, |
check_needed); |
} |
+ |
+ __ bind(&skip_assignment); |
} |