Index: src/ic/arm64/ic-arm64.cc |
diff --git a/src/ic/arm64/ic-arm64.cc b/src/ic/arm64/ic-arm64.cc |
index 7a330b3c3ac4ce65dfe75e04fd0f79d3696657ca..04fdff76e1eb34893c043ffd1da552cab87248a9 100644 |
--- a/src/ic/arm64/ic-arm64.cc |
+++ b/src/ic/arm64/ic-arm64.cc |
@@ -15,120 +15,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. |
-// The 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. |
-static void GenerateDictionaryLoad(MacroAssembler* masm, Label* miss, |
- Register elements, Register name, |
- Register result, Register scratch1, |
- Register scratch2) { |
- DCHECK(!AreAliased(elements, name, scratch1, scratch2)); |
- DCHECK(!AreAliased(result, scratch1, scratch2)); |
- |
- 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); |
- |
- static const int kElementsStartOffset = |
- NameDictionary::kHeaderSize + |
- NameDictionary::kElementsStartIndex * kPointerSize; |
- static const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; |
- __ Ldr(scratch1, FieldMemOperand(scratch2, kDetailsOffset)); |
- __ Tst(scratch1, Smi::FromInt(PropertyDetails::TypeField::kMask)); |
- __ B(ne, miss); |
- |
- // Get the value at the masked, scaled index and return. |
- __ Ldr(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 (never clobbered). |
-// |
-// The generated code assumes that the receiver has slow properties, |
-// is not a global object and does not have interceptors. |
-static void GenerateDictionaryStore(MacroAssembler* masm, Label* miss, |
- Register elements, Register name, |
- Register value, Register scratch1, |
- Register scratch2) { |
- DCHECK(!AreAliased(elements, name, value, scratch1, scratch2)); |
- |
- 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); |
- |
- static const int kElementsStartOffset = |
- NameDictionary::kHeaderSize + |
- NameDictionary::kElementsStartIndex * kPointerSize; |
- static const int kDetailsOffset = kElementsStartOffset + 2 * kPointerSize; |
- static const int kTypeAndReadOnlyMask = |
- PropertyDetails::TypeField::kMask | |
- PropertyDetails::AttributesField::encode(READ_ONLY); |
- __ Ldrsw(scratch1, UntagSmiFieldMemOperand(scratch2, kDetailsOffset)); |
- __ Tst(scratch1, kTypeAndReadOnlyMask); |
- __ B(ne, miss); |
- |
- // Store the value at the masked, scaled index and return. |
- static const int kValueOffset = kElementsStartOffset + kPointerSize; |
- __ Add(scratch2, scratch2, kValueOffset - kHeapObjectTag); |
- __ Str(value, MemOperand(scratch2)); |
- |
- // Update the write barrier. Make sure not to clobber the value. |
- __ Mov(scratch1, value); |
- __ RecordWrite(elements, scratch2, scratch1, kLRHasNotBeenSaved, |
- kDontSaveFPRegs); |
-} |
- |
-void LoadIC::GenerateNormal(MacroAssembler* masm) { |
- Register dictionary = x0; |
- DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister())); |
- DCHECK(!dictionary.is(LoadDescriptor::NameRegister())); |
- Label slow; |
- |
- __ Ldr(dictionary, FieldMemOperand(LoadDescriptor::ReceiverRegister(), |
- JSObject::kPropertiesOffset)); |
- GenerateDictionaryLoad(masm, &slow, dictionary, |
- LoadDescriptor::NameRegister(), x0, x3, x4); |
- __ Ret(); |
- |
- // Dictionary load failed, go slow (but don't miss). |
- __ Bind(&slow); |
- GenerateRuntimeGetProperty(masm); |
-} |
- |
-void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
- // The return address is in lr. |
- __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); |
- |
- // Do tail-call to runtime routine. |
- __ TailCallRuntime(Runtime::kGetProperty); |
-} |
- |
static void StoreIC_PushArgs(MacroAssembler* masm) { |
__ Push(StoreWithVectorDescriptor::ValueRegister(), |
StoreWithVectorDescriptor::SlotRegister(), |
@@ -153,38 +39,6 @@ void KeyedStoreIC::GenerateSlow(MacroAssembler* masm) { |
__ TailCallRuntime(Runtime::kKeyedStoreIC_Slow); |
} |
-void StoreIC::GenerateMiss(MacroAssembler* masm) { |
- StoreIC_PushArgs(masm); |
- |
- // Tail call to the entry. |
- __ TailCallRuntime(Runtime::kStoreIC_Miss); |
-} |
- |
- |
-void StoreIC::GenerateNormal(MacroAssembler* masm) { |
- Label miss; |
- Register value = StoreDescriptor::ValueRegister(); |
- Register receiver = StoreDescriptor::ReceiverRegister(); |
- Register name = StoreDescriptor::NameRegister(); |
- Register dictionary = x5; |
- DCHECK(!AreAliased(value, receiver, name, |
- StoreWithVectorDescriptor::SlotRegister(), |
- StoreWithVectorDescriptor::VectorRegister(), x5, x6, x7)); |
- |
- __ Ldr(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); |
- |
- GenerateDictionaryStore(masm, &miss, dictionary, name, value, x6, x7); |
- Counters* counters = masm->isolate()->counters(); |
- __ IncrementCounter(counters->ic_store_normal_hit(), 1, x6, x7); |
- __ Ret(); |
- |
- // Cache miss: Jump to runtime. |
- __ Bind(&miss); |
- __ IncrementCounter(counters->ic_store_normal_miss(), 1, x6, x7); |
- GenerateMiss(masm); |
-} |
- |
- |
Condition CompareIC::ComputeCondition(Token::Value op) { |
switch (op) { |
case Token::EQ_STRICT: |