| Index: src/mips64/code-stubs-mips64.cc
|
| diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc
|
| index dad5e75fd75b47f3f7d0d560aefa0cbdd71be4aa..f2661830d2b20bd0432fad378f482c1b85d6daa7 100644
|
| --- a/src/mips64/code-stubs-mips64.cc
|
| +++ b/src/mips64/code-stubs-mips64.cc
|
| @@ -5340,7 +5340,8 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
|
| Register name_reg = a3;
|
| Register value_reg = a0;
|
| Register cell_reg = a4;
|
| - Register cell_details_reg = a5;
|
| + Register cell_value_reg = a5;
|
| + Register cell_details_reg = a6;
|
| Label fast_heapobject_case, fast_smi_case, slow_case;
|
|
|
| if (FLAG_debug_code) {
|
| @@ -5361,6 +5362,11 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
|
| __ Daddu(at, at, Context::SlotOffset(0));
|
| __ ld(cell_reg, MemOperand(at));
|
|
|
| + // Check that cell value is not the_hole.
|
| + __ ld(cell_value_reg, FieldMemOperand(cell_reg, PropertyCell::kValueOffset));
|
| + __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
|
| + __ Branch(&slow_case, eq, cell_value_reg, Operand(at));
|
| +
|
| // Load PropertyDetails for the cell (actually only the cell_type and kind).
|
| __ ld(cell_details_reg,
|
| FieldMemOperand(cell_reg, PropertyCell::kDetailsOffset));
|
| @@ -5389,8 +5395,7 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
|
| // Check if PropertyCell value matches the new value (relevant for Constant,
|
| // ConstantType and Undefined cells).
|
| Label not_same_value;
|
| - __ ld(at, FieldMemOperand(cell_reg, PropertyCell::kValueOffset));
|
| - __ Branch(¬_same_value, ne, value_reg, Operand(at));
|
| + __ Branch(¬_same_value, ne, value_reg, Operand(cell_value_reg));
|
| if (FLAG_debug_code) {
|
| Label done;
|
| // This can only be true for Constant, ConstantType and Undefined cells,
|
| @@ -5421,8 +5426,6 @@ void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) {
|
| // Now either both old and new values must be SMIs or both must be heap
|
| // objects with same map.
|
| Label value_is_heap_object;
|
| - Register cell_value_reg = cell_details_reg;
|
| - __ ld(cell_value_reg, FieldMemOperand(cell_reg, PropertyCell::kValueOffset));
|
| __ JumpIfNotSmi(value_reg, &value_is_heap_object);
|
| __ JumpIfNotSmi(cell_value_reg, &slow_case);
|
| // Old and new values are SMIs, no need for a write barrier here.
|
|
|