Index: src/mips64/code-stubs-mips64.cc |
diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc |
index b095efa44b9a09f2169e34003fbef78d3ea2fcad..7da216af18adebc76a7b4635b10300a9fad9e413 100644 |
--- a/src/mips64/code-stubs-mips64.cc |
+++ b/src/mips64/code-stubs-mips64.cc |
@@ -4600,119 +4600,6 @@ void FastNewStrictArgumentsStub::Generate(MacroAssembler* masm) { |
} |
-void StoreGlobalViaContextStub::Generate(MacroAssembler* masm) { |
- Register context_reg = cp; |
- Register slot_reg = a2; |
- Register value_reg = a0; |
- Register cell_reg = a4; |
- Register cell_value_reg = a5; |
- Register cell_details_reg = a6; |
- Label fast_heapobject_case, fast_smi_case, slow_case; |
- |
- if (FLAG_debug_code) { |
- __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
- __ Check(ne, kUnexpectedValue, value_reg, Operand(at)); |
- } |
- |
- // Go up context chain to the script context. |
- for (int i = 0; i < depth(); ++i) { |
- __ ld(cell_reg, ContextMemOperand(context_reg, Context::PREVIOUS_INDEX)); |
- context_reg = cell_reg; |
- } |
- |
- // Load the PropertyCell at the specified slot. |
- __ Dlsa(at, context_reg, slot_reg, kPointerSizeLog2); |
- __ ld(cell_reg, ContextMemOperand(at, 0)); |
- |
- // Load PropertyDetails for the cell (actually only the cell_type and kind). |
- __ ld(cell_details_reg, |
- FieldMemOperand(cell_reg, PropertyCell::kDetailsOffset)); |
- __ SmiUntag(cell_details_reg); |
- __ And(cell_details_reg, cell_details_reg, |
- PropertyDetails::PropertyCellTypeField::kMask | |
- PropertyDetails::KindField::kMask | |
- PropertyDetails::kAttributesReadOnlyMask); |
- |
- // Check if PropertyCell holds mutable data. |
- Label not_mutable_data; |
- __ Branch(¬_mutable_data, ne, cell_details_reg, |
- Operand(PropertyDetails::PropertyCellTypeField::encode( |
- PropertyCellType::kMutable) | |
- PropertyDetails::KindField::encode(kData))); |
- __ JumpIfSmi(value_reg, &fast_smi_case); |
- __ bind(&fast_heapobject_case); |
- __ sd(value_reg, FieldMemOperand(cell_reg, PropertyCell::kValueOffset)); |
- __ RecordWriteField(cell_reg, PropertyCell::kValueOffset, value_reg, |
- cell_details_reg, kRAHasNotBeenSaved, kDontSaveFPRegs, |
- EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
- // RecordWriteField clobbers the value register, so we need to reload. |
- __ Ret(USE_DELAY_SLOT); |
- __ ld(value_reg, FieldMemOperand(cell_reg, PropertyCell::kValueOffset)); |
- __ bind(¬_mutable_data); |
- |
- // Check if PropertyCell value matches the new value (relevant for Constant, |
- // ConstantType and Undefined cells). |
- Label not_same_value; |
- __ ld(cell_value_reg, FieldMemOperand(cell_reg, PropertyCell::kValueOffset)); |
- __ Branch(¬_same_value, ne, value_reg, Operand(cell_value_reg)); |
- // Make sure the PropertyCell is not marked READ_ONLY. |
- __ And(at, cell_details_reg, PropertyDetails::kAttributesReadOnlyMask); |
- __ Branch(&slow_case, ne, at, Operand(zero_reg)); |
- if (FLAG_debug_code) { |
- Label done; |
- // This can only be true for Constant, ConstantType and Undefined cells, |
- // because we never store the_hole via this stub. |
- __ Branch(&done, eq, cell_details_reg, |
- Operand(PropertyDetails::PropertyCellTypeField::encode( |
- PropertyCellType::kConstant) | |
- PropertyDetails::KindField::encode(kData))); |
- __ Branch(&done, eq, cell_details_reg, |
- Operand(PropertyDetails::PropertyCellTypeField::encode( |
- PropertyCellType::kConstantType) | |
- PropertyDetails::KindField::encode(kData))); |
- __ Check(eq, kUnexpectedValue, cell_details_reg, |
- Operand(PropertyDetails::PropertyCellTypeField::encode( |
- PropertyCellType::kUndefined) | |
- PropertyDetails::KindField::encode(kData))); |
- __ bind(&done); |
- } |
- __ Ret(); |
- __ bind(¬_same_value); |
- |
- // Check if PropertyCell contains data with constant type (and is not |
- // READ_ONLY). |
- __ Branch(&slow_case, ne, cell_details_reg, |
- Operand(PropertyDetails::PropertyCellTypeField::encode( |
- PropertyCellType::kConstantType) | |
- PropertyDetails::KindField::encode(kData))); |
- |
- // Now either both old and new values must be SMIs or both must be heap |
- // objects with same map. |
- Label value_is_heap_object; |
- __ 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. |
- __ bind(&fast_smi_case); |
- __ Ret(USE_DELAY_SLOT); |
- __ sd(value_reg, FieldMemOperand(cell_reg, PropertyCell::kValueOffset)); |
- __ bind(&value_is_heap_object); |
- __ JumpIfSmi(cell_value_reg, &slow_case); |
- Register cell_value_map_reg = cell_value_reg; |
- __ ld(cell_value_map_reg, |
- FieldMemOperand(cell_value_reg, HeapObject::kMapOffset)); |
- __ Branch(&fast_heapobject_case, eq, cell_value_map_reg, |
- FieldMemOperand(value_reg, HeapObject::kMapOffset)); |
- |
- // Fallback to the runtime. |
- __ bind(&slow_case); |
- __ SmiTag(slot_reg); |
- __ Push(slot_reg, value_reg); |
- __ TailCallRuntime(is_strict(language_mode()) |
- ? Runtime::kStoreGlobalViaContext_Strict |
- : Runtime::kStoreGlobalViaContext_Sloppy); |
-} |
- |
- |
static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { |
int64_t offset = (ref0.address() - ref1.address()); |
DCHECK(static_cast<int>(offset) == offset); |