Commit 26ffee2c authored by mvstanton's avatar mvstanton Committed by Commit bot

Eliminate redundant descriptor ElementTransitionAndStoreDescriptor.

It's just the same as StoreTransitionDescriptor.

BUG=

Review URL: https://codereview.chromium.org/1248973002

Cr-Commit-Position: refs/heads/master@{#29789}
parent 1c857357
......@@ -47,9 +47,6 @@ const Register StoreGlobalViaContextDescriptor::NameRegister() { return r3; }
const Register StoreGlobalViaContextDescriptor::ValueRegister() { return r0; }
const Register ElementTransitionAndStoreDescriptor::MapRegister() { return r3; }
const Register InstanceofDescriptor::left() { return r0; }
const Register InstanceofDescriptor::right() { return r1; }
......
......@@ -47,9 +47,6 @@ const Register StoreGlobalViaContextDescriptor::NameRegister() { return x3; }
const Register StoreGlobalViaContextDescriptor::ValueRegister() { return x0; }
const Register ElementTransitionAndStoreDescriptor::MapRegister() { return x3; }
const Register InstanceofDescriptor::left() {
// Object to check (instanceof lhs).
return x11;
......
......@@ -1829,10 +1829,10 @@ Handle<Code> StoreGlobalViaContextStub::GenerateCode() {
template <>
HValue* CodeStubGraphBuilder<ElementsTransitionAndStoreStub>::BuildCodeStub() {
HValue* value = GetParameter(ElementsTransitionAndStoreStub::kValueIndex);
HValue* map = GetParameter(ElementsTransitionAndStoreStub::kMapIndex);
HValue* key = GetParameter(ElementsTransitionAndStoreStub::kKeyIndex);
HValue* object = GetParameter(ElementsTransitionAndStoreStub::kObjectIndex);
HValue* object = GetParameter(StoreTransitionDescriptor::kReceiverIndex);
HValue* key = GetParameter(StoreTransitionDescriptor::kNameIndex);
HValue* value = GetParameter(StoreTransitionDescriptor::kValueIndex);
HValue* map = GetParameter(StoreTransitionDescriptor::kMapIndex);
if (FLAG_trace_elements_transitions) {
// Tracing elements transitions is the job of the runtime.
......
......@@ -2946,35 +2946,13 @@ class ElementsTransitionAndStoreStub : public HydrogenCodeStub {
return StoreModeBits::decode(sub_minor_key());
}
// Parameters accessed via CodeStubGraphBuilder::GetParameter()
enum ParameterIndices {
kValueIndex,
kMapIndex,
kKeyIndex,
kObjectIndex,
kParameterCount
};
static const Register ValueRegister() {
return ElementTransitionAndStoreDescriptor::ValueRegister();
}
static const Register MapRegister() {
return ElementTransitionAndStoreDescriptor::MapRegister();
}
static const Register KeyRegister() {
return ElementTransitionAndStoreDescriptor::NameRegister();
}
static const Register ObjectRegister() {
return ElementTransitionAndStoreDescriptor::ReceiverRegister();
}
private:
class FromBits : public BitField<ElementsKind, 0, 8> {};
class ToBits : public BitField<ElementsKind, 8, 8> {};
class IsJSArrayBits : public BitField<bool, 16, 1> {};
class StoreModeBits : public BitField<KeyedAccessStoreMode, 17, 4> {};
DEFINE_CALL_INTERFACE_DESCRIPTOR(ElementTransitionAndStore);
DEFINE_CALL_INTERFACE_DESCRIPTOR(StoreTransition);
DEFINE_HYDROGEN_CODE_STUB(ElementsTransitionAndStore, HydrogenCodeStub);
};
......
......@@ -46,11 +46,6 @@ const Register StoreGlobalViaContextDescriptor::NameRegister() { return ecx; }
const Register StoreGlobalViaContextDescriptor::ValueRegister() { return eax; }
const Register ElementTransitionAndStoreDescriptor::MapRegister() {
return ebx;
}
const Register InstanceofDescriptor::left() { return eax; }
const Register InstanceofDescriptor::right() { return edx; }
......
......@@ -33,7 +33,7 @@ Register* PropertyAccessCompiler::store_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3.
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
DCHECK(r3.is(ElementTransitionAndStoreDescriptor::MapRegister()));
DCHECK(r3.is(StoreTransitionDescriptor::MapRegister()));
static Register registers[] = {receiver, name, r3, r4, r5};
return registers;
}
......
......@@ -65,7 +65,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(MapHandleList* maps,
// Polymorphic keyed stores may use the map register
Register map_reg = scratch1();
DCHECK(kind() != Code::KEYED_STORE_IC ||
map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister()));
map_reg.is(StoreTransitionDescriptor::MapRegister()));
int receiver_count = maps->length();
int number_of_handled_maps = 0;
......
......@@ -40,7 +40,7 @@ Register* PropertyAccessCompiler::store_calling_convention() {
// receiver, value, scratch1, scratch2, scratch3.
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
DCHECK(x3.is(ElementTransitionAndStoreDescriptor::MapRegister()));
DCHECK(x3.is(StoreTransitionDescriptor::MapRegister()));
static Register registers[] = {receiver, name, x3, x4, x5};
return registers;
}
......
......@@ -65,7 +65,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(MapHandleList* maps,
// Polymorphic keyed stores may use the map register
Register map_reg = scratch1();
DCHECK(kind() != Code::KEYED_STORE_IC ||
map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister()));
map_reg.is(StoreTransitionDescriptor::MapRegister()));
__ Ldr(map_reg, FieldMemOperand(receiver(), HeapObject::kMapOffset));
int receiver_count = maps->length();
int number_of_handled_maps = 0;
......
......@@ -32,7 +32,7 @@ Register* PropertyAccessCompiler::store_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3.
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
DCHECK(ebx.is(ElementTransitionAndStoreDescriptor::MapRegister()));
DCHECK(ebx.is(StoreTransitionDescriptor::MapRegister()));
static Register registers[] = {receiver, name, ebx, edi, no_reg};
return registers;
}
......
......@@ -69,7 +69,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(MapHandleList* maps,
// Polymorphic keyed stores may use the map register
Register map_reg = scratch1();
DCHECK(kind() != Code::KEYED_STORE_IC ||
map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister()));
map_reg.is(StoreTransitionDescriptor::MapRegister()));
__ mov(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset));
int receiver_count = maps->length();
int number_of_handled_maps = 0;
......
......@@ -2604,10 +2604,11 @@ RUNTIME_FUNCTION(ElementsTransitionAndStoreIC_Miss) {
HandleScope scope(isolate);
DCHECK(args.length() == 4);
KeyedStoreIC ic(IC::EXTRA_CALL_FRAME, isolate);
Handle<Object> value = args.at<Object>(0);
Handle<Map> map = args.at<Map>(1);
Handle<Object> key = args.at<Object>(2);
Handle<Object> object = args.at<Object>(3);
Handle<Object> object = args.at<Object>(0);
Handle<Object> key = args.at<Object>(1);
Handle<Object> value = args.at<Object>(2);
Handle<Map> map = args.at<Map>(3);
LanguageMode language_mode = ic.language_mode();
if (object->IsJSObject()) {
JSObject::TransitionElementsKind(Handle<JSObject>::cast(object),
......
......@@ -33,7 +33,7 @@ Register* PropertyAccessCompiler::store_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3.
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
DCHECK(a3.is(ElementTransitionAndStoreDescriptor::MapRegister()));
DCHECK(a3.is(StoreTransitionDescriptor::MapRegister()));
static Register registers[] = {receiver, name, a3, t0, t1};
return registers;
}
......
......@@ -48,7 +48,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(MapHandleList* maps,
// Polymorphic keyed stores may use the map register
Register map_reg = scratch1();
DCHECK(kind() != Code::KEYED_STORE_IC ||
map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister()));
map_reg.is(StoreTransitionDescriptor::MapRegister()));
int receiver_count = maps->length();
int number_of_handled_maps = 0;
......
......@@ -33,7 +33,7 @@ Register* PropertyAccessCompiler::store_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3.
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
DCHECK(a3.is(ElementTransitionAndStoreDescriptor::MapRegister()));
DCHECK(a3.is(StoreTransitionDescriptor::MapRegister()));
static Register registers[] = {receiver, name, a3, a4, a5};
return registers;
}
......
......@@ -48,7 +48,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(MapHandleList* maps,
// Polymorphic keyed stores may use the map register
Register map_reg = scratch1();
DCHECK(kind() != Code::KEYED_STORE_IC ||
map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister()));
map_reg.is(StoreTransitionDescriptor::MapRegister()));
int receiver_count = maps->length();
int number_of_handled_maps = 0;
......
......@@ -33,7 +33,7 @@ Register* PropertyAccessCompiler::store_calling_convention() {
// receiver, name, scratch1, scratch2, scratch3.
Register receiver = StoreDescriptor::ReceiverRegister();
Register name = StoreDescriptor::NameRegister();
DCHECK(rbx.is(ElementTransitionAndStoreDescriptor::MapRegister()));
DCHECK(rbx.is(StoreTransitionDescriptor::MapRegister()));
static Register registers[] = {receiver, name, rbx, rdi, r8};
return registers;
}
......
......@@ -105,7 +105,7 @@ Handle<Code> PropertyICCompiler::CompilePolymorphic(MapHandleList* maps,
// Polymorphic keyed stores may use the map register
Register map_reg = scratch1();
DCHECK(kind() != Code::KEYED_STORE_IC ||
map_reg.is(ElementTransitionAndStoreDescriptor::MapRegister()));
map_reg.is(StoreTransitionDescriptor::MapRegister()));
__ movp(map_reg, FieldOperand(receiver(), HeapObject::kMapOffset));
int receiver_count = maps->length();
int number_of_handled_maps = 0;
......
......@@ -148,14 +148,6 @@ void StoreGlobalViaContextDescriptor::InitializePlatformSpecific(
}
void ElementTransitionAndStoreDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {ValueRegister(), MapRegister(), NameRegister(),
ReceiverRegister()};
data->InitializePlatformSpecific(arraysize(registers), registers);
}
void InstanceofDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {left(), right()};
......
......@@ -17,7 +17,6 @@ class PlatformInterfaceDescriptor;
V(Load) \
V(Store) \
V(StoreTransition) \
V(ElementTransitionAndStore) \
V(VectorStoreICTrampoline) \
V(VectorStoreIC) \
V(Instanceof) \
......@@ -269,14 +268,6 @@ class StoreTransitionDescriptor : public StoreDescriptor {
};
class ElementTransitionAndStoreDescriptor : public StoreDescriptor {
public:
DECLARE_DESCRIPTOR(ElementTransitionAndStoreDescriptor, StoreDescriptor)
static const Register MapRegister();
};
class InstanceofDescriptor : public CallInterfaceDescriptor {
public:
DECLARE_DESCRIPTOR(InstanceofDescriptor, CallInterfaceDescriptor)
......
......@@ -47,9 +47,6 @@ const Register StoreGlobalViaContextDescriptor::NameRegister() { return a3; }
const Register StoreGlobalViaContextDescriptor::ValueRegister() { return a0; }
const Register ElementTransitionAndStoreDescriptor::MapRegister() { return a3; }
const Register InstanceofDescriptor::left() { return a0; }
const Register InstanceofDescriptor::right() { return a1; }
......
......@@ -47,9 +47,6 @@ const Register StoreGlobalViaContextDescriptor::NameRegister() { return a3; }
const Register StoreGlobalViaContextDescriptor::ValueRegister() { return a0; }
const Register ElementTransitionAndStoreDescriptor::MapRegister() { return a3; }
const Register InstanceofDescriptor::left() { return a0; }
const Register InstanceofDescriptor::right() { return a1; }
......
......@@ -47,11 +47,6 @@ const Register StoreGlobalViaContextDescriptor::NameRegister() { return rcx; }
const Register StoreGlobalViaContextDescriptor::ValueRegister() { return rax; }
const Register ElementTransitionAndStoreDescriptor::MapRegister() {
return rbx;
}
const Register InstanceofDescriptor::left() { return rax; }
const Register InstanceofDescriptor::right() { return rdx; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment