| Index: src/ic/x64/ic-x64.cc
|
| diff --git a/src/ic/x64/ic-x64.cc b/src/ic/x64/ic-x64.cc
|
| index 7516882bb5f45cdefff86b044c6d007db7cbc204..eed9cf70822d8240709b2b21033548115cc108b1 100644
|
| --- a/src/ic/x64/ic-x64.cc
|
| +++ b/src/ic/x64/ic-x64.cc
|
| @@ -257,8 +257,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(rdx));
|
| DCHECK(key.is(rcx));
|
|
|
| @@ -407,8 +407,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 = rbx;
|
| Register result = rax;
|
| DCHECK(!scratch.is(receiver) && !scratch.is(index));
|
| @@ -433,8 +433,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 = rax;
|
| DCHECK(!scratch.is(receiver) && !scratch.is(key));
|
|
|
| @@ -478,9 +478,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(rdx));
|
| DCHECK(key.is(rcx));
|
| DCHECK(value.is(rax));
|
| @@ -615,8 +615,8 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
|
| Label slow, slow_with_tagged_index, 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(rdx));
|
| DCHECK(key.is(rcx));
|
|
|
| @@ -767,8 +767,8 @@ static Operand GenerateUnmappedArgumentsLookup(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(rdx));
|
| DCHECK(key.is(rcx));
|
|
|
| @@ -793,9 +793,9 @@ void KeyedLoadIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
| void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
| // The 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(rdx));
|
| DCHECK(name.is(rcx));
|
| DCHECK(value.is(rax));
|
| @@ -825,8 +825,8 @@ void KeyedStoreIC::GenerateSloppyArguments(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(rdx));
|
| DCHECK(name.is(rcx));
|
|
|
| @@ -842,15 +842,15 @@ void LoadIC::GenerateMegamorphic(MacroAssembler* masm) {
|
|
|
| void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
| Register dictionary = rax;
|
| - DCHECK(!dictionary.is(ReceiverRegister()));
|
| - DCHECK(!dictionary.is(NameRegister()));
|
| + DCHECK(!dictionary.is(LoadConvention::ReceiverRegister()));
|
| + DCHECK(!dictionary.is(LoadConvention::NameRegister()));
|
|
|
| Label slow;
|
|
|
| - __ movp(dictionary,
|
| - FieldOperand(ReceiverRegister(), JSObject::kPropertiesOffset));
|
| - GenerateDictionaryLoad(masm, &slow, dictionary, NameRegister(), rbx, rdi,
|
| - rax);
|
| + __ movp(dictionary, FieldOperand(LoadConvention::ReceiverRegister(),
|
| + JSObject::kPropertiesOffset));
|
| + GenerateDictionaryLoad(masm, &slow, dictionary,
|
| + LoadConvention::NameRegister(), rbx, rdi, rax);
|
| __ ret(0);
|
|
|
| // Dictionary load failed, go slow (but don't miss).
|
| @@ -873,8 +873,8 @@ void LoadIC::GenerateMiss(MacroAssembler* masm) {
|
| __ IncrementCounter(counters->load_miss(), 1);
|
|
|
| __ PopReturnAddressTo(LoadIC_TempRegister());
|
| - __ Push(ReceiverRegister()); // receiver
|
| - __ Push(NameRegister()); // name
|
| + __ Push(LoadConvention::ReceiverRegister()); // receiver
|
| + __ Push(LoadConvention::NameRegister()); // name
|
| __ PushReturnAddressFrom(LoadIC_TempRegister());
|
|
|
| // Perform tail call to the entry.
|
| @@ -888,8 +888,8 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
| // The return address is on the stack.
|
|
|
| __ PopReturnAddressTo(LoadIC_TempRegister());
|
| - __ Push(ReceiverRegister()); // receiver
|
| - __ Push(NameRegister()); // name
|
| + __ Push(LoadConvention::ReceiverRegister()); // receiver
|
| + __ Push(LoadConvention::NameRegister()); // name
|
| __ PushReturnAddressFrom(LoadIC_TempRegister());
|
|
|
| // Perform tail call to the entry.
|
| @@ -903,8 +903,8 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
| __ IncrementCounter(counters->keyed_load_miss(), 1);
|
|
|
| __ PopReturnAddressTo(KeyedLoadIC_TempRegister());
|
| - __ Push(ReceiverRegister()); // receiver
|
| - __ Push(NameRegister()); // name
|
| + __ Push(LoadConvention::ReceiverRegister()); // receiver
|
| + __ Push(LoadConvention::NameRegister()); // name
|
| __ PushReturnAddressFrom(KeyedLoadIC_TempRegister());
|
|
|
| // Perform tail call to the entry.
|
| @@ -914,37 +914,12 @@ void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| -// IC register specifications
|
| -const Register LoadIC::ReceiverRegister() { return rdx; }
|
| -const Register LoadIC::NameRegister() { return rcx; }
|
| -
|
| -
|
| -const Register LoadIC::SlotRegister() {
|
| - DCHECK(FLAG_vector_ics);
|
| - return rax;
|
| -}
|
| -
|
| -
|
| -const Register LoadIC::VectorRegister() {
|
| - DCHECK(FLAG_vector_ics);
|
| - return rbx;
|
| -}
|
| -
|
| -
|
| -const Register StoreIC::ReceiverRegister() { return rdx; }
|
| -const Register StoreIC::NameRegister() { return rcx; }
|
| -const Register StoreIC::ValueRegister() { return rax; }
|
| -
|
| -
|
| -const Register KeyedStoreIC::MapRegister() { return rbx; }
|
| -
|
| -
|
| void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
| // The return address is on the stack.
|
|
|
| __ PopReturnAddressTo(KeyedLoadIC_TempRegister());
|
| - __ Push(ReceiverRegister()); // receiver
|
| - __ Push(NameRegister()); // name
|
| + __ Push(LoadConvention::ReceiverRegister()); // receiver
|
| + __ Push(LoadConvention::NameRegister()); // name
|
| __ PushReturnAddressFrom(KeyedLoadIC_TempRegister());
|
|
|
| // Perform tail call to the entry.
|
| @@ -958,8 +933,9 @@ void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
|
| // Get the receiver from the stack and probe the stub cache.
|
| Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
|
| Code::ComputeHandlerFlags(Code::STORE_IC));
|
| - masm->isolate()->stub_cache()->GenerateProbe(masm, flags, ReceiverRegister(),
|
| - NameRegister(), rbx, no_reg);
|
| + masm->isolate()->stub_cache()->GenerateProbe(
|
| + masm, flags, StoreConvention::ReceiverRegister(),
|
| + StoreConvention::NameRegister(), rbx, no_reg);
|
|
|
| // Cache miss: Jump to runtime.
|
| GenerateMiss(masm);
|
| @@ -967,9 +943,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(!rbx.is(receiver) && !rbx.is(name) && !rbx.is(value));
|
|
|
| @@ -993,9 +969,9 @@ void StoreIC::GenerateMiss(MacroAssembler* masm) {
|
|
|
|
|
| void StoreIC::GenerateNormal(MacroAssembler* masm) {
|
| - Register receiver = ReceiverRegister();
|
| - Register name = NameRegister();
|
| - Register value = ValueRegister();
|
| + Register receiver = StoreConvention::ReceiverRegister();
|
| + Register name = StoreConvention::NameRegister();
|
| + Register value = StoreConvention::ValueRegister();
|
| Register dictionary = rbx;
|
|
|
| Label miss;
|
|
|