Index: src/ic/mips64/ic-mips64.cc |
diff --git a/src/ic/mips64/ic-mips64.cc b/src/ic/mips64/ic-mips64.cc |
index 14b1b9b6c236ceb82c4c74c5f570872c7755bc48..fa351ba5a365cb4b3b7b325716c13d06fe3c6012 100644 |
--- a/src/ic/mips64/ic-mips64.cc |
+++ b/src/ic/mips64/ic-mips64.cc |
@@ -19,136 +19,6 @@ namespace internal { |
#define __ ACCESS_MASM(masm) |
-// Helper function used from LoadIC GenerateNormal. |
-// |
-// elements: Property dictionary. It is not clobbered if a jump to the miss |
-// label is done. |
-// name: Property name. It is not clobbered if a jump to the miss label is |
-// done |
-// result: Register for the result. It is only updated if a jump to the miss |
-// label is not done. Can be the same as elements or name clobbering |
-// one of these in the case of not jumping to the miss label. |
-// The two scratch registers need to be different from elements, name and |
-// result. |
-// The generated code assumes that the receiver has slow properties, |
-// is not a global object and does not have interceptors. |
-// The address returned from GenerateStringDictionaryProbes() in scratch2 |
-// is used. |
-static void GenerateDictionaryLoad(MacroAssembler* masm, Label* miss, |
- Register elements, Register name, |
- Register result, Register scratch1, |
- Register scratch2) { |
- // Main use of the scratch registers. |
- // scratch1: Used as temporary and to hold the capacity of the property |
- // dictionary. |
- // scratch2: Used as temporary. |
- Label done; |
- |
- // Probe the dictionary. |
- NameDictionaryLookupStub::GeneratePositiveLookup(masm, miss, &done, elements, |
- name, scratch1, scratch2); |
- |
- // If probing finds an entry check that the value is a normal |
- // property. |
- __ bind(&done); // scratch2 == elements + 4 * index. |
- const int kElementsStartOffset = |
- NameDictionary::kHeaderSize + |
- NameDictionary::kElementsStartIndex * kPointerSize; |
- const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; |
- __ ld(scratch1, FieldMemOperand(scratch2, kDetailsOffset)); |
- __ And(at, scratch1, |
- Operand(Smi::FromInt(PropertyDetails::TypeField::kMask))); |
- __ Branch(miss, ne, at, Operand(zero_reg)); |
- |
- // Get the value at the masked, scaled index and return. |
- __ ld(result, |
- FieldMemOperand(scratch2, kElementsStartOffset + 1 * kPointerSize)); |
-} |
- |
- |
-// Helper function used from StoreIC::GenerateNormal. |
-// |
-// elements: Property dictionary. It is not clobbered if a jump to the miss |
-// label is done. |
-// name: Property name. It is not clobbered if a jump to the miss label is |
-// done |
-// value: The value to store. |
-// The two scratch registers need to be different from elements, name and |
-// result. |
-// The generated code assumes that the receiver has slow properties, |
-// is not a global object and does not have interceptors. |
-// The address returned from GenerateStringDictionaryProbes() in scratch2 |
-// is used. |
-static void GenerateDictionaryStore(MacroAssembler* masm, Label* miss, |
- Register elements, Register name, |
- Register value, Register scratch1, |
- Register scratch2) { |
- // Main use of the scratch registers. |
- // scratch1: Used as temporary and to hold the capacity of the property |
- // dictionary. |
- // scratch2: Used as temporary. |
- Label done; |
- |
- // Probe the dictionary. |
- NameDictionaryLookupStub::GeneratePositiveLookup(masm, miss, &done, elements, |
- name, scratch1, scratch2); |
- |
- // If probing finds an entry in the dictionary check that the value |
- // is a normal property that is not read only. |
- __ bind(&done); // scratch2 == elements + 4 * index. |
- const int kElementsStartOffset = |
- NameDictionary::kHeaderSize + |
- NameDictionary::kElementsStartIndex * kPointerSize; |
- const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; |
- const int kTypeAndReadOnlyMask = |
- (PropertyDetails::TypeField::kMask | |
- PropertyDetails::AttributesField::encode(READ_ONLY)); |
- __ ld(scratch1, FieldMemOperand(scratch2, kDetailsOffset)); |
- __ And(at, scratch1, Operand(Smi::FromInt(kTypeAndReadOnlyMask))); |
- __ Branch(miss, ne, at, Operand(zero_reg)); |
- |
- // Store the value at the masked, scaled index and return. |
- const int kValueOffset = kElementsStartOffset + kPointerSize; |
- __ Daddu(scratch2, scratch2, Operand(kValueOffset - kHeapObjectTag)); |
- __ sd(value, MemOperand(scratch2)); |
- |
- // Update the write barrier. Make sure not to clobber the value. |
- __ mov(scratch1, value); |
- __ RecordWrite(elements, scratch2, scratch1, kRAHasNotBeenSaved, |
- kDontSaveFPRegs); |
-} |
- |
-void LoadIC::GenerateNormal(MacroAssembler* masm) { |
- Register dictionary = a0; |
- DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister())); |
- DCHECK(!dictionary.is(LoadDescriptor::NameRegister())); |
- Label slow; |
- |
- __ ld(dictionary, FieldMemOperand(LoadDescriptor::ReceiverRegister(), |
- JSObject::kPropertiesOffset)); |
- GenerateDictionaryLoad(masm, &slow, dictionary, |
- LoadDescriptor::NameRegister(), v0, a3, a4); |
- __ Ret(); |
- |
- // Dictionary load failed, go slow (but don't miss). |
- __ bind(&slow); |
- GenerateRuntimeGetProperty(masm); |
-} |
- |
- |
-// A register that isn't one of the parameters to the load ic. |
-static const Register LoadIC_TempRegister() { return a3; } |
- |
-void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
- // The return address is in ra. |
- |
- __ mov(LoadIC_TempRegister(), LoadDescriptor::ReceiverRegister()); |
- __ Push(LoadIC_TempRegister(), LoadDescriptor::NameRegister()); |
- |
- // Do tail-call to runtime routine. |
- __ TailCallRuntime(Runtime::kGetProperty); |
-} |
- |
static void StoreIC_PushArgs(MacroAssembler* masm) { |
__ Push(StoreWithVectorDescriptor::ValueRegister(), |
StoreWithVectorDescriptor::SlotRegister(), |
@@ -172,38 +42,6 @@ void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) { |
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow); |
} |
-void StoreIC::GenerateMiss(MacroAssembler* masm) { |
- StoreIC_PushArgs(masm); |
- |
- // Perform tail call to the entry. |
- __ TailCallRuntime(Runtime::kStoreIC_Miss); |
-} |
- |
- |
-void StoreIC::GenerateNormal(MacroAssembler* masm) { |
- Label miss; |
- Register receiver = StoreDescriptor::ReceiverRegister(); |
- Register name = StoreDescriptor::NameRegister(); |
- Register value = StoreDescriptor::ValueRegister(); |
- Register dictionary = a5; |
- DCHECK(!AreAliased( |
- value, receiver, name, StoreWithVectorDescriptor::VectorRegister(), |
- StoreWithVectorDescriptor::SlotRegister(), dictionary, a6, a7)); |
- |
- __ ld(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); |
- |
- GenerateDictionaryStore(masm, &miss, dictionary, name, value, a6, a7); |
- Counters* counters = masm->isolate()->counters(); |
- __ IncrementCounter(counters->ic_store_normal_hit(), 1, a6, a7); |
- __ Ret(USE_DELAY_SLOT); |
- __ Move(v0, value); // Ensure the stub returns correct value. |
- |
- __ bind(&miss); |
- __ IncrementCounter(counters->ic_store_normal_miss(), 1, a6, a7); |
- GenerateMiss(masm); |
-} |
- |
- |
#undef __ |