Index: src/ic/x87/ic-x87.cc |
diff --git a/src/ic/x87/ic-x87.cc b/src/ic/x87/ic-x87.cc |
index bb0aa27a7810f4d11e44e0403416bd54f9a2da1d..d43d059250f9e52f0ec3f10f5e9863ca0f4fa979 100644 |
--- a/src/ic/x87/ic-x87.cc |
+++ b/src/ic/x87/ic-x87.cc |
@@ -312,8 +312,8 @@ void KeyedLoadIC::GenerateGeneric(MacroAssembler* masm) { |
Label slow, check_name, index_smi, index_name, property_array_property; |
Label probe_dictionary, check_number_dictionary; |
- Register receiver = ReceiverRegister(); |
- Register key = NameRegister(); |
+ Register receiver = LoadConvention::ReceiverRegister(); |
+ Register key = LoadConvention::NameRegister(); |
DCHECK(receiver.is(edx)); |
DCHECK(key.is(ecx)); |
@@ -482,8 +482,8 @@ void KeyedLoadIC::GenerateString(MacroAssembler* masm) { |
// Return address is on the stack. |
Label miss; |
- Register receiver = ReceiverRegister(); |
- Register index = NameRegister(); |
+ Register receiver = LoadConvention::ReceiverRegister(); |
+ Register index = LoadConvention::NameRegister(); |
Register scratch = ebx; |
DCHECK(!scratch.is(receiver) && !scratch.is(index)); |
Register result = eax; |
@@ -509,8 +509,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { |
// Return address is on the stack. |
Label slow; |
- Register receiver = ReceiverRegister(); |
- Register key = NameRegister(); |
+ Register receiver = LoadConvention::ReceiverRegister(); |
+ Register key = LoadConvention::NameRegister(); |
Register scratch = eax; |
DCHECK(!scratch.is(receiver) && !scratch.is(key)); |
@@ -549,8 +549,8 @@ void KeyedLoadIC::GenerateIndexedInterceptor(MacroAssembler* masm) { |
void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { |
// The return address is on the stack. |
- Register receiver = ReceiverRegister(); |
- Register key = NameRegister(); |
+ Register receiver = LoadConvention::ReceiverRegister(); |
+ Register key = LoadConvention::NameRegister(); |
DCHECK(receiver.is(edx)); |
DCHECK(key.is(ecx)); |
@@ -576,9 +576,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) { |
void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { |
// Return address is on the stack. |
Label slow, notin; |
- Register receiver = ReceiverRegister(); |
- Register name = NameRegister(); |
- Register value = ValueRegister(); |
+ Register receiver = StoreConvention::ReceiverRegister(); |
+ Register name = StoreConvention::NameRegister(); |
+ Register value = StoreConvention::ValueRegister(); |
DCHECK(receiver.is(edx)); |
DCHECK(name.is(ecx)); |
DCHECK(value.is(eax)); |
@@ -610,9 +610,9 @@ static void KeyedStoreGenerateGenericHelper( |
Label transition_smi_elements; |
Label finish_object_store, non_double_value, transition_double_elements; |
Label fast_double_without_map_check; |
- Register receiver = KeyedStoreIC::ReceiverRegister(); |
- Register key = KeyedStoreIC::NameRegister(); |
- Register value = KeyedStoreIC::ValueRegister(); |
+ Register receiver = StoreConvention::ReceiverRegister(); |
+ Register key = StoreConvention::NameRegister(); |
+ Register value = StoreConvention::ValueRegister(); |
DCHECK(receiver.is(edx)); |
DCHECK(key.is(ecx)); |
DCHECK(value.is(eax)); |
@@ -747,8 +747,8 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
Label slow, fast_object, fast_object_grow; |
Label fast_double, fast_double_grow; |
Label array, extra, check_if_double_array; |
- Register receiver = ReceiverRegister(); |
- Register key = NameRegister(); |
+ Register receiver = StoreConvention::ReceiverRegister(); |
+ Register key = StoreConvention::NameRegister(); |
DCHECK(receiver.is(edx)); |
DCHECK(key.is(ecx)); |
@@ -827,8 +827,8 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, |
void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
// The return address is on the stack. |
- Register receiver = ReceiverRegister(); |
- Register name = NameRegister(); |
+ Register receiver = LoadConvention::ReceiverRegister(); |
+ Register name = LoadConvention::NameRegister(); |
DCHECK(receiver.is(edx)); |
DCHECK(name.is(ecx)); |
@@ -845,15 +845,15 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
void LoadIC::GenerateNormal(MacroAssembler* masm) { |
Register dictionary = eax; |
- DCHECK(!dictionary.is(ReceiverRegister())); |
- DCHECK(!dictionary.is(NameRegister())); |
+ DCHECK(!dictionary.is(LoadConvention::ReceiverRegister())); |
+ DCHECK(!dictionary.is(LoadConvention::NameRegister())); |
Label slow; |
- __ mov(dictionary, |
- FieldOperand(ReceiverRegister(), JSObject::kPropertiesOffset)); |
- GenerateDictionaryLoad(masm, &slow, dictionary, NameRegister(), edi, ebx, |
- eax); |
+ __ mov(dictionary, FieldOperand(LoadConvention::ReceiverRegister(), |
+ JSObject::kPropertiesOffset)); |
+ GenerateDictionaryLoad(masm, &slow, dictionary, |
+ LoadConvention::NameRegister(), edi, ebx, eax); |
__ ret(0); |
// Dictionary load failed, go slow (but don't miss). |
@@ -863,8 +863,8 @@ void LoadIC::GenerateNormal(MacroAssembler* masm) { |
static void LoadIC_PushArgs(MacroAssembler* masm) { |
- Register receiver = LoadIC::ReceiverRegister(); |
- Register name = LoadIC::NameRegister(); |
+ Register receiver = LoadConvention::ReceiverRegister(); |
+ Register name = LoadConvention::NameRegister(); |
DCHECK(!ebx.is(receiver) && !ebx.is(name)); |
__ pop(ebx); |
@@ -909,31 +909,6 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
} |
-// IC register specifications |
-const Register LoadIC::ReceiverRegister() { return edx; } |
-const Register LoadIC::NameRegister() { return ecx; } |
- |
- |
-const Register LoadIC::SlotRegister() { |
- DCHECK(FLAG_vector_ics); |
- return eax; |
-} |
- |
- |
-const Register LoadIC::VectorRegister() { |
- DCHECK(FLAG_vector_ics); |
- return ebx; |
-} |
- |
- |
-const Register StoreIC::ReceiverRegister() { return edx; } |
-const Register StoreIC::NameRegister() { return ecx; } |
-const Register StoreIC::ValueRegister() { return eax; } |
- |
- |
-const Register KeyedStoreIC::MapRegister() { return ebx; } |
- |
- |
void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
// Return address is on the stack. |
LoadIC_PushArgs(masm); |
@@ -947,8 +922,9 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
// Return address is on the stack. |
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
Code::ComputeHandlerFlags(Code::STORE_IC)); |
- masm->isolate()->stub_cache()->GenerateProbe(masm, flags, ReceiverRegister(), |
- NameRegister(), ebx, no_reg); |
+ masm->isolate()->stub_cache()->GenerateProbe( |
+ masm, flags, StoreConvention::ReceiverRegister(), |
+ StoreConvention::NameRegister(), ebx, no_reg); |
// Cache miss: Jump to runtime. |
GenerateMiss(masm); |
@@ -956,9 +932,9 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
static void StoreIC_PushArgs(MacroAssembler* masm) { |
- Register receiver = StoreIC::ReceiverRegister(); |
- Register name = StoreIC::NameRegister(); |
- Register value = StoreIC::ValueRegister(); |
+ Register receiver = StoreConvention::ReceiverRegister(); |
+ Register name = StoreConvention::NameRegister(); |
+ Register value = StoreConvention::ValueRegister(); |
DCHECK(!ebx.is(receiver) && !ebx.is(name) && !ebx.is(value)); |
@@ -983,9 +959,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) { |
void StoreIC::GenerateNormal(MacroAssembler* masm) { |
Label restore_miss; |
- Register receiver = ReceiverRegister(); |
- Register name = NameRegister(); |
- Register value = ValueRegister(); |
+ Register receiver = StoreConvention::ReceiverRegister(); |
+ Register name = StoreConvention::NameRegister(); |
+ Register value = StoreConvention::ValueRegister(); |
Register dictionary = ebx; |
__ mov(dictionary, FieldOperand(receiver, JSObject::kPropertiesOffset)); |