Index: src/ic/arm64/ic-arm64.cc |
diff --git a/src/ic/arm64/ic-arm64.cc b/src/ic/arm64/ic-arm64.cc |
index 6985ea5d4e6f62ed4d8d77a60859277f1f563272..fc9c981b66d915842c5a220879d023354811413e 100644 |
--- a/src/ic/arm64/ic-arm64.cc |
+++ b/src/ic/arm64/ic-arm64.cc |
@@ -333,8 +333,8 @@ static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm, |
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
// The return address is in lr. |
- Register receiver = ReceiverRegister(); |
- Register name = NameRegister(); |
+ Register receiver = LoadConvention::ReceiverRegister(); |
+ Register name = LoadConvention::NameRegister(); |
DCHECK(receiver.is(x1)); |
DCHECK(name.is(x2)); |
@@ -351,13 +351,14 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
void LoadIC::GenerateNormal(MacroAssembler* masm) { |
Register dictionary = x0; |
- DCHECK(!dictionary.is(ReceiverRegister())); |
- DCHECK(!dictionary.is(NameRegister())); |
+ DCHECK(!dictionary.is(LoadConvention::ReceiverRegister())); |
+ DCHECK(!dictionary.is(LoadConvention::NameRegister())); |
Label slow; |
- __ Ldr(dictionary, |
- FieldMemOperand(ReceiverRegister(), JSObject::kPropertiesOffset)); |
- GenerateDictionaryLoad(masm, &slow, dictionary, NameRegister(), x0, x3, x4); |
+ __ Ldr(dictionary, FieldMemOperand(LoadConvention::ReceiverRegister(), |
+ JSObject::kPropertiesOffset)); |
+ GenerateDictionaryLoad(masm, &slow, dictionary, |
+ LoadConvention::NameRegister(), x0, x3, x4); |
__ Ret(); |
// Dictionary load failed, go slow (but don't miss). |
@@ -374,7 +375,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) { |
__ IncrementCounter(isolate->counters()->load_miss(), 1, x3, x4); |
// Perform tail call to the entry. |
- __ Push(ReceiverRegister(), NameRegister()); |
+ __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); |
ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); |
__ TailCallExternalReference(ref, 2, 1); |
} |
@@ -382,7 +383,7 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) { |
void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
// The return address is in lr. |
- __ Push(ReceiverRegister(), NameRegister()); |
+ __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); |
__ TailCallRuntime(Runtime::kGetProperty, 2, 1); |
} |
@@ -390,8 +391,8 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { |
// The return address is in lr. |
Register result = x0; |
- Register receiver = ReceiverRegister(); |
- Register key = NameRegister(); |
+ Register receiver = LoadConvention::ReceiverRegister(); |
+ Register key = LoadConvention::NameRegister(); |
DCHECK(receiver.is(x1)); |
DCHECK(key.is(x2)); |
@@ -419,9 +420,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { |
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { |
ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments"); |
Label slow, notin; |
- Register value = ValueRegister(); |
- Register key = NameRegister(); |
- Register receiver = ReceiverRegister(); |
+ Register value = StoreConvention::ValueRegister(); |
+ Register key = StoreConvention::NameRegister(); |
+ Register receiver = StoreConvention::ReceiverRegister(); |
DCHECK(receiver.is(x1)); |
DCHECK(key.is(x2)); |
DCHECK(value.is(x0)); |
@@ -468,7 +469,7 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
__ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11); |
- __ Push(ReceiverRegister(), NameRegister()); |
+ __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); |
// Perform tail call to the entry. |
ExternalReference ref = |
@@ -478,33 +479,9 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
} |
-// IC register specifications |
-const Register LoadIC::ReceiverRegister() { return x1; } |
-const Register LoadIC::NameRegister() { return x2; } |
- |
-const Register LoadIC::SlotRegister() { |
- DCHECK(FLAG_vector_ics); |
- return x0; |
-} |
- |
- |
-const Register LoadIC::VectorRegister() { |
- DCHECK(FLAG_vector_ics); |
- return x3; |
-} |
- |
- |
-const Register StoreIC::ReceiverRegister() { return x1; } |
-const Register StoreIC::NameRegister() { return x2; } |
-const Register StoreIC::ValueRegister() { return x0; } |
- |
- |
-const Register KeyedStoreIC::MapRegister() { return x3; } |
- |
- |
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
// The return address is in lr. |
- __ Push(ReceiverRegister(), NameRegister()); |
+ __ Push(LoadConvention::ReceiverRegister(), LoadConvention::NameRegister()); |
__ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); |
} |
@@ -668,8 +645,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { |
// The return address is in lr. |
Label slow, check_name, index_smi, index_name; |
- Register key = NameRegister(); |
- Register receiver = ReceiverRegister(); |
+ Register key = LoadConvention::NameRegister(); |
+ Register receiver = LoadConvention::ReceiverRegister(); |
DCHECK(key.is(x2)); |
DCHECK(receiver.is(x1)); |
@@ -701,8 +678,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) { |
// Return address is in lr. |
Label miss; |
- Register receiver = ReceiverRegister(); |
- Register index = NameRegister(); |
+ Register receiver = LoadConvention::ReceiverRegister(); |
+ Register index = LoadConvention::NameRegister(); |
Register result = x0; |
Register scratch = x3; |
DCHECK(!scratch.is(receiver) && !scratch.is(index)); |
@@ -727,8 +704,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { |
// Return address is in lr. |
Label slow; |
- Register receiver = ReceiverRegister(); |
- Register key = NameRegister(); |
+ Register receiver = LoadConvention::ReceiverRegister(); |
+ Register key = LoadConvention::NameRegister(); |
Register scratch1 = x3; |
Register scratch2 = x4; |
DCHECK(!AreAliased(scratch1, scratch2, receiver, key)); |
@@ -767,7 +744,8 @@ void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
ASM_LOCATION("KeyedStoreIC::GenerateMiss"); |
// Push receiver, key and value for runtime call. |
- __ Push(ReceiverRegister(), NameRegister(), ValueRegister()); |
+ __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), |
+ StoreConvention::ValueRegister()); |
ExternalReference ref = |
ExternalReference(IC_Utility(kKeyedStoreIC_Miss), masm->isolate()); |
@@ -918,9 +896,9 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
Label fast_double_grow; |
Label fast_double; |
- Register value = ValueRegister(); |
- Register key = NameRegister(); |
- Register receiver = ReceiverRegister(); |
+ Register value = StoreConvention::ValueRegister(); |
+ Register key = StoreConvention::NameRegister(); |
+ Register receiver = StoreConvention::ReceiverRegister(); |
DCHECK(receiver.is(x1)); |
DCHECK(key.is(x2)); |
DCHECK(value.is(x0)); |
@@ -1008,9 +986,10 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
- Register receiver = ReceiverRegister(); |
- Register name = NameRegister(); |
- DCHECK(!AreAliased(receiver, name, ValueRegister(), x3, x4, x5, x6)); |
+ Register receiver = StoreConvention::ReceiverRegister(); |
+ Register name = StoreConvention::NameRegister(); |
+ DCHECK(!AreAliased(receiver, name, StoreConvention::ValueRegister(), x3, x4, |
+ x5, x6)); |
// Probe the stub cache. |
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
@@ -1024,7 +1003,8 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
void StoreIC::GenerateMiss(MacroAssembler* masm) { |
- __ Push(ReceiverRegister(), NameRegister(), ValueRegister()); |
+ __ Push(StoreConvention::ReceiverRegister(), StoreConvention::NameRegister(), |
+ StoreConvention::ValueRegister()); |
// Tail call to the entry. |
ExternalReference ref = |
@@ -1035,9 +1015,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) { |
void StoreIC::GenerateNormal(MacroAssembler* masm) { |
Label miss; |
- Register value = ValueRegister(); |
- Register receiver = ReceiverRegister(); |
- Register name = NameRegister(); |
+ Register value = StoreConvention::ValueRegister(); |
+ Register receiver = StoreConvention::ReceiverRegister(); |
+ Register name = StoreConvention::NameRegister(); |
Register dictionary = x3; |
DCHECK(!AreAliased(value, receiver, name, x3, x4, x5)); |