Commit c29a4061 authored by mvstanton's avatar mvstanton Committed by Commit bot

VectorICs: Cleanup, remove unnecessary arguments from HandleArrayCases()

BUG=

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

Cr-Commit-Position: refs/heads/master@{#30542}
parent db440dfe
...@@ -4341,11 +4341,10 @@ void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) { ...@@ -4341,11 +4341,10 @@ void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
} }
static void HandleArrayCases(MacroAssembler* masm, Register receiver, static void HandleArrayCases(MacroAssembler* masm, Register feedback,
Register key, Register vector, Register slot, Register receiver_map, Register scratch1,
Register feedback, Register receiver_map, Register scratch2, bool is_polymorphic,
Register scratch1, Register scratch2, Label* miss) {
bool is_polymorphic, Label* miss) {
// feedback initially contains the feedback array // feedback initially contains the feedback array
Label next_loop, prepare_next; Label next_loop, prepare_next;
Label start_polymorphic; Label start_polymorphic;
...@@ -4455,8 +4454,7 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4455,8 +4454,7 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ ldr(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset)); __ ldr(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset));
__ CompareRoot(scratch1, Heap::kFixedArrayMapRootIndex); __ CompareRoot(scratch1, Heap::kFixedArrayMapRootIndex);
__ b(ne, &not_array); __ b(ne, &not_array);
HandleArrayCases(masm, receiver, name, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, scratch1, r9, true, &miss);
scratch1, r9, true, &miss);
__ bind(&not_array); __ bind(&not_array);
__ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex); __ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex);
...@@ -4516,8 +4514,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4516,8 +4514,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
// We have a polymorphic element handler. // We have a polymorphic element handler.
Label polymorphic, try_poly_name; Label polymorphic, try_poly_name;
__ bind(&polymorphic); __ bind(&polymorphic);
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, scratch1, r9, true, &miss);
scratch1, r9, true, &miss);
__ bind(&not_array); __ bind(&not_array);
// Is it generic? // Is it generic?
...@@ -4536,8 +4533,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4536,8 +4533,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ add(feedback, vector, Operand::PointerOffsetFromSmiKey(slot)); __ add(feedback, vector, Operand::PointerOffsetFromSmiKey(slot));
__ ldr(feedback, __ ldr(feedback,
FieldMemOperand(feedback, FixedArray::kHeaderSize + kPointerSize)); FieldMemOperand(feedback, FixedArray::kHeaderSize + kPointerSize));
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, scratch1, r9, false, &miss);
scratch1, r9, false, &miss);
__ bind(&miss); __ bind(&miss);
KeyedLoadIC::GenerateMiss(masm); KeyedLoadIC::GenerateMiss(masm);
......
...@@ -4497,11 +4497,10 @@ void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) { ...@@ -4497,11 +4497,10 @@ void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
} }
static void HandleArrayCases(MacroAssembler* masm, Register receiver, static void HandleArrayCases(MacroAssembler* masm, Register feedback,
Register key, Register vector, Register slot, Register receiver_map, Register scratch1,
Register feedback, Register receiver_map, Register scratch2, bool is_polymorphic,
Register scratch1, Register scratch2, Label* miss) {
bool is_polymorphic, Label* miss) {
// feedback initially contains the feedback array // feedback initially contains the feedback array
Label next_loop, prepare_next; Label next_loop, prepare_next;
Label load_smi_map, compare_map; Label load_smi_map, compare_map;
...@@ -4613,8 +4612,7 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4613,8 +4612,7 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ Bind(&try_array); __ Bind(&try_array);
__ Ldr(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset)); __ Ldr(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset));
__ JumpIfNotRoot(scratch1, Heap::kFixedArrayMapRootIndex, &not_array); __ JumpIfNotRoot(scratch1, Heap::kFixedArrayMapRootIndex, &not_array);
HandleArrayCases(masm, receiver, name, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, scratch1, x7, true, &miss);
scratch1, x7, true, &miss);
__ Bind(&not_array); __ Bind(&not_array);
__ JumpIfNotRoot(feedback, Heap::kmegamorphic_symbolRootIndex, &miss); __ JumpIfNotRoot(feedback, Heap::kmegamorphic_symbolRootIndex, &miss);
...@@ -4671,8 +4669,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4671,8 +4669,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
// We have a polymorphic element handler. // We have a polymorphic element handler.
Label polymorphic, try_poly_name; Label polymorphic, try_poly_name;
__ Bind(&polymorphic); __ Bind(&polymorphic);
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, scratch1, x7, true, &miss);
scratch1, x7, true, &miss);
__ Bind(&not_array); __ Bind(&not_array);
// Is it generic? // Is it generic?
...@@ -4691,8 +4688,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4691,8 +4688,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ Add(feedback, vector, Operand::UntagSmiAndScale(slot, kPointerSizeLog2)); __ Add(feedback, vector, Operand::UntagSmiAndScale(slot, kPointerSizeLog2));
__ Ldr(feedback, __ Ldr(feedback,
FieldMemOperand(feedback, FixedArray::kHeaderSize + kPointerSize)); FieldMemOperand(feedback, FixedArray::kHeaderSize + kPointerSize));
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, scratch1, x7, false, &miss);
scratch1, x7, false, &miss);
__ Bind(&miss); __ Bind(&miss);
KeyedLoadIC::GenerateMiss(masm); KeyedLoadIC::GenerateMiss(masm);
......
...@@ -4567,11 +4567,10 @@ void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) { ...@@ -4567,11 +4567,10 @@ void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
} }
static void HandleArrayCases(MacroAssembler* masm, Register receiver, static void HandleArrayCases(MacroAssembler* masm, Register feedback,
Register key, Register vector, Register slot, Register receiver_map, Register scratch1,
Register feedback, Register receiver_map, Register scratch2, bool is_polymorphic,
Register scratch1, Register scratch2, Label* miss) {
bool is_polymorphic, Label* miss) {
// feedback initially contains the feedback array // feedback initially contains the feedback array
Label next_loop, prepare_next; Label next_loop, prepare_next;
Label start_polymorphic; Label start_polymorphic;
...@@ -4683,8 +4682,7 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4683,8 +4682,7 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ lw(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset)); __ lw(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset));
__ LoadRoot(at, Heap::kFixedArrayMapRootIndex); __ LoadRoot(at, Heap::kFixedArrayMapRootIndex);
__ Branch(&not_array, ne, at, Operand(scratch1)); __ Branch(&not_array, ne, at, Operand(scratch1));
HandleArrayCases(masm, receiver, name, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, scratch1, t5, true, &miss);
scratch1, t5, true, &miss);
__ bind(&not_array); __ bind(&not_array);
__ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex); __ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex);
...@@ -4745,8 +4743,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4745,8 +4743,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Label polymorphic, try_poly_name; Label polymorphic, try_poly_name;
__ bind(&polymorphic); __ bind(&polymorphic);
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, scratch1, t5, true, &miss);
scratch1, t5, true, &miss);
__ bind(&not_array); __ bind(&not_array);
// Is it generic? // Is it generic?
...@@ -4765,8 +4762,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4765,8 +4762,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ Addu(feedback, vector, Operand(at)); __ Addu(feedback, vector, Operand(at));
__ lw(feedback, __ lw(feedback,
FieldMemOperand(feedback, FixedArray::kHeaderSize + kPointerSize)); FieldMemOperand(feedback, FixedArray::kHeaderSize + kPointerSize));
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, scratch1, t5, false, &miss);
scratch1, t5, false, &miss);
__ bind(&miss); __ bind(&miss);
KeyedLoadIC::GenerateMiss(masm); KeyedLoadIC::GenerateMiss(masm);
......
...@@ -4600,11 +4600,10 @@ void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) { ...@@ -4600,11 +4600,10 @@ void LoadICStub::GenerateForTrampoline(MacroAssembler* masm) {
} }
static void HandleArrayCases(MacroAssembler* masm, Register receiver, static void HandleArrayCases(MacroAssembler* masm, Register feedback,
Register key, Register vector, Register slot, Register receiver_map, Register scratch1,
Register feedback, Register receiver_map, Register scratch2, bool is_polymorphic,
Register scratch1, Register scratch2, Label* miss) {
bool is_polymorphic, Label* miss) {
// feedback initially contains the feedback array // feedback initially contains the feedback array
Label next_loop, prepare_next; Label next_loop, prepare_next;
Label start_polymorphic; Label start_polymorphic;
...@@ -4714,8 +4713,7 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4714,8 +4713,7 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ ld(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset)); __ ld(scratch1, FieldMemOperand(feedback, HeapObject::kMapOffset));
__ LoadRoot(at, Heap::kFixedArrayMapRootIndex); __ LoadRoot(at, Heap::kFixedArrayMapRootIndex);
__ Branch(&not_array, ne, scratch1, Operand(at)); __ Branch(&not_array, ne, scratch1, Operand(at));
HandleArrayCases(masm, receiver, name, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, scratch1, a7, true, &miss);
scratch1, a7, true, &miss);
__ bind(&not_array); __ bind(&not_array);
__ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex); __ LoadRoot(at, Heap::kmegamorphic_symbolRootIndex);
...@@ -4776,8 +4774,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4776,8 +4774,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
Label polymorphic, try_poly_name; Label polymorphic, try_poly_name;
__ bind(&polymorphic); __ bind(&polymorphic);
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, scratch1, a7, true, &miss);
scratch1, a7, true, &miss);
__ bind(&not_array); __ bind(&not_array);
// Is it generic? // Is it generic?
...@@ -4796,8 +4793,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4796,8 +4793,7 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ Daddu(feedback, vector, Operand(feedback)); __ Daddu(feedback, vector, Operand(feedback));
__ ld(feedback, __ ld(feedback,
FieldMemOperand(feedback, FixedArray::kHeaderSize + kPointerSize)); FieldMemOperand(feedback, FixedArray::kHeaderSize + kPointerSize));
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, scratch1, a7, false, &miss);
scratch1, a7, false, &miss);
__ bind(&miss); __ bind(&miss);
KeyedLoadIC::GenerateMiss(masm); KeyedLoadIC::GenerateMiss(masm);
......
...@@ -4311,12 +4311,10 @@ void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) { ...@@ -4311,12 +4311,10 @@ void KeyedLoadICTrampolineStub::Generate(MacroAssembler* masm) {
} }
static void HandleArrayCases(MacroAssembler* masm, Register receiver, static void HandleArrayCases(MacroAssembler* masm, Register feedback,
Register key, Register vector, Register slot, Register receiver_map, Register scratch1,
Register feedback, Register receiver_map, Register scratch2, Register scratch3,
Register scratch1, Register scratch2, bool is_polymorphic, Label* miss) {
Register scratch3, bool is_polymorphic,
Label* miss) {
// feedback initially contains the feedback array // feedback initially contains the feedback array
Label next_loop, prepare_next; Label next_loop, prepare_next;
Label start_polymorphic; Label start_polymorphic;
...@@ -4418,8 +4416,8 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4418,8 +4416,8 @@ void LoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
__ bind(&try_array); __ bind(&try_array);
__ CompareRoot(FieldOperand(feedback, 0), Heap::kFixedArrayMapRootIndex); __ CompareRoot(FieldOperand(feedback, 0), Heap::kFixedArrayMapRootIndex);
__ j(not_equal, &not_array); __ j(not_equal, &not_array);
HandleArrayCases(masm, receiver, name, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, integer_slot, r11, r15, true,
integer_slot, r11, r15, true, &miss); &miss);
__ bind(&not_array); __ bind(&not_array);
__ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex); __ CompareRoot(feedback, Heap::kmegamorphic_symbolRootIndex);
...@@ -4477,8 +4475,8 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4477,8 +4475,8 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
// We have a polymorphic element handler. // We have a polymorphic element handler.
Label polymorphic, try_poly_name; Label polymorphic, try_poly_name;
__ bind(&polymorphic); __ bind(&polymorphic);
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, integer_slot, r11, r15, true,
integer_slot, r11, r15, true, &miss); &miss);
__ bind(&not_array); __ bind(&not_array);
// Is it generic? // Is it generic?
...@@ -4496,8 +4494,8 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { ...@@ -4496,8 +4494,8 @@ void KeyedLoadICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) {
// at least one map/handler pair. // at least one map/handler pair.
__ movp(feedback, FieldOperand(vector, integer_slot, times_pointer_size, __ movp(feedback, FieldOperand(vector, integer_slot, times_pointer_size,
FixedArray::kHeaderSize + kPointerSize)); FixedArray::kHeaderSize + kPointerSize));
HandleArrayCases(masm, receiver, key, vector, slot, feedback, receiver_map, HandleArrayCases(masm, feedback, receiver_map, integer_slot, r11, r15, false,
integer_slot, r11, r15, false, &miss); &miss);
__ bind(&miss); __ bind(&miss);
KeyedLoadIC::GenerateMiss(masm); KeyedLoadIC::GenerateMiss(masm);
......
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