VectorICs: Cleanup, remove unnecessary arguments from HandleArrayCases()

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30542}
This commit is contained in:
mvstanton 2015-09-02 05:28:43 -07:00 committed by Commit bot
parent db440dfe8d
commit c29a4061c9
5 changed files with 38 additions and 56 deletions

View File

@ -4341,11 +4341,10 @@ void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
}
static void HandleArrayCases(MacroAssembler* masm, Register receiver,
Register key, Register vector, Register slot,
Register feedback, Register receiver_map,
Register scratch1, Register scratch2,
bool is_polymorphic, Label* miss) {
static void HandleArrayCases(MacroAssembler* masm, Register feedback,
Register receiver_map, Register scratch1,
Register scratch2, bool is_polymorphic,
Label* miss) {
// feedback initially contains the feedback array
Label next_loop, prepare_next;
Label start_polymorphic;
@ -4455,8 +4454,7 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ ldr(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset));
__ CompareRoot(scratch1, Heap::kFixedArrayMapRootIndex);
__ b(ne, &not_array);
HandleArrayCases(masm, receiver, name, vector, slot, feedback, receiver_map,
scratch1, r9, true, &miss);
HandleArrayCases(masm, feedback, receiver_map, scratch1, r9, true, &miss);
__ bind(&not_array);
__ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex);
@ -4516,8 +4514,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
// We have a polymorphic element handler.
Label polymorphic, try_poly_name;
__ bind(&polymorphic);
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map,
scratch1, r9, true, &miss);
HandleArrayCases(masm, feedback, receiver_map, scratch1, r9, true, &miss);
__ bind(&not_array);
// Is it generic?
@ -4536,8 +4533,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ add(feedback, vector, Operand::PointerOffsetFromSmiKey(slot));
__ ldr(feedback,
FieldMemOperand(feedback, FixedArray::kHeaderSize + kPointerSize));
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map,
scratch1, r9, false, &miss);
HandleArrayCases(masm, feedback, receiver_map, scratch1, r9, false, &miss);
__ bind(&miss);
KeyedLoadIC::GenerateMiss(masm);

View File

@ -4497,11 +4497,10 @@ void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
}
static void HandleArrayCases(MacroAssembler* masm, Register receiver,
Register key, Register vector, Register slot,
Register feedback, Register receiver_map,
Register scratch1, Register scratch2,
bool is_polymorphic, Label* miss) {
static void HandleArrayCases(MacroAssembler* masm, Register feedback,
Register receiver_map, Register scratch1,
Register scratch2, bool is_polymorphic,
Label* miss) {
// feedback initially contains the feedback array
Label next_loop, prepare_next;
Label load_smi_map, compare_map;
@ -4613,8 +4612,7 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ Bind(&try_array);
__ Ldr(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset));
__ JumpIfNotRoot(scratch1, Heap::kFixedArrayMapRootIndex, &not_array);
HandleArrayCases(masm, receiver, name, vector, slot, feedback, receiver_map,
scratch1, x7, true, &miss);
HandleArrayCases(masm, feedback, receiver_map, scratch1, x7, true, &miss);
__ Bind(&not_array);
__ JumpIfNotRoot(feedback, Heap::kmegamorphic_symbolRootIndex, &miss);
@ -4671,8 +4669,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
// We have a polymorphic element handler.
Label polymorphic, try_poly_name;
__ Bind(&polymorphic);
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map,
scratch1, x7, true, &miss);
HandleArrayCases(masm, feedback, receiver_map, scratch1, x7, true, &miss);
__ Bind(&not_array);
// Is it generic?
@ -4691,8 +4688,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ Add(feedback, vector, Operand::UntagSmiAndScale(slot, kPointerSizeLog2));
__ Ldr(feedback,
FieldMemOperand(feedback, FixedArray::kHeaderSize + kPointerSize));
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map,
scratch1, x7, false, &miss);
HandleArrayCases(masm, feedback, receiver_map, scratch1, x7, false, &miss);
__ Bind(&miss);
KeyedLoadIC::GenerateMiss(masm);

View File

@ -4567,11 +4567,10 @@ void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
}
static void HandleArrayCases(MacroAssembler* masm, Register receiver,
Register key, Register vector, Register slot,
Register feedback, Register receiver_map,
Register scratch1, Register scratch2,
bool is_polymorphic, Label* miss) {
static void HandleArrayCases(MacroAssembler* masm, Register feedback,
Register receiver_map, Register scratch1,
Register scratch2, bool is_polymorphic,
Label* miss) {
// feedback initially contains the feedback array
Label next_loop, prepare_next;
Label start_polymorphic;
@ -4683,8 +4682,7 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ lw(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset));
__ LoadRoot(at, Heap::kFixedArrayMapRootIndex);
__ Branch(&not_array, ne, at, Operand(scratch1));
HandleArrayCases(masm, receiver, name, vector, slot, feedback, receiver_map,
scratch1, t5, true, &miss);
HandleArrayCases(masm, feedback, receiver_map, scratch1, t5, true, &miss);
__ bind(&not_array);
__ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex);
@ -4745,8 +4743,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Label polymorphic, try_poly_name;
__ bind(&polymorphic);
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map,
scratch1, t5, true, &miss);
HandleArrayCases(masm, feedback, receiver_map, scratch1, t5, true, &miss);
__ bind(&not_array);
// Is it generic?
@ -4765,8 +4762,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ Addu(feedback, vector, Operand(at));
__ lw(feedback,
FieldMemOperand(feedback, FixedArray::kHeaderSize + kPointerSize));
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map,
scratch1, t5, false, &miss);
HandleArrayCases(masm, feedback, receiver_map, scratch1, t5, false, &miss);
__ bind(&miss);
KeyedLoadIC::GenerateMiss(masm);

View File

@ -4600,11 +4600,10 @@ void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
}
static void HandleArrayCases(MacroAssembler* masm, Register receiver,
Register key, Register vector, Register slot,
Register feedback, Register receiver_map,
Register scratch1, Register scratch2,
bool is_polymorphic, Label* miss) {
static void HandleArrayCases(MacroAssembler* masm, Register feedback,
Register receiver_map, Register scratch1,
Register scratch2, bool is_polymorphic,
Label* miss) {
// feedback initially contains the feedback array
Label next_loop, prepare_next;
Label start_polymorphic;
@ -4714,8 +4713,7 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ ld(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset));
__ LoadRoot(at, Heap::kFixedArrayMapRootIndex);
__ Branch(&not_array, ne, scratch1, Operand(at));
HandleArrayCases(masm, receiver, name, vector, slot, feedback, receiver_map,
scratch1, a7, true, &miss);
HandleArrayCases(masm, feedback, receiver_map, scratch1, a7, true, &miss);
__ bind(&not_array);
__ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex);
@ -4776,8 +4774,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Label polymorphic, try_poly_name;
__ bind(&polymorphic);
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map,
scratch1, a7, true, &miss);
HandleArrayCases(masm, feedback, receiver_map, scratch1, a7, true, &miss);
__ bind(&not_array);
// Is it generic?
@ -4796,8 +4793,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ Daddu(feedback, vector, Operand(feedback));
__ ld(feedback,
FieldMemOperand(feedback, FixedArray::kHeaderSize + kPointerSize));
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map,
scratch1, a7, false, &miss);
HandleArrayCases(masm, feedback, receiver_map, scratch1, a7, false, &miss);
__ bind(&miss);
KeyedLoadIC::GenerateMiss(masm);

View File

@ -4311,12 +4311,10 @@ void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
}
static void HandleArrayCases(MacroAssembler* masm, Register receiver,
Register key, Register vector, Register slot,
Register feedback, Register receiver_map,
Register scratch1, Register scratch2,
Register scratch3, bool is_polymorphic,
Label* miss) {
static void HandleArrayCases(MacroAssembler* masm, Register feedback,
Register receiver_map, Register scratch1,
Register scratch2, Register scratch3,
bool is_polymorphic, Label* miss) {
// feedback initially contains the feedback array
Label next_loop, prepare_next;
Label start_polymorphic;
@ -4418,8 +4416,8 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ bind(&try_array);
__ CompareRoot(FieldOperand(feedback, 0), Heap::kFixedArrayMapRootIndex);
__ j(not_equal, &not_array);
HandleArrayCases(masm, receiver, name, vector, slot, feedback, receiver_map,
integer_slot, r11, r15, true, &miss);
HandleArrayCases(masm, feedback, receiver_map, integer_slot, r11, r15, true,
&miss);
__ bind(&not_array);
__ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex);
@ -4477,8 +4475,8 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
// We have a polymorphic element handler.
Label polymorphic, try_poly_name;
__ bind(&polymorphic);
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map,
integer_slot, r11, r15, true, &miss);
HandleArrayCases(masm, feedback, receiver_map, integer_slot, r11, r15, true,
&miss);
__ bind(&not_array);
// Is it generic?
@ -4496,8 +4494,8 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
// at least one map/handler pair.
__ movp(feedback, FieldOperand(vector, integer_slot, times_pointer_size,
FixedArray::kHeaderSize + kPointerSize));
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map,
integer_slot, r11, r15, false, &miss);
HandleArrayCases(masm, feedback, receiver_map, integer_slot, r11, r15, false,
&miss);
__ bind(&miss);
KeyedLoadIC::GenerateMiss(masm);