Index: src/ic/mips64/ic-mips64.cc |
diff --git a/src/ic/mips64/ic-mips64.cc b/src/ic/mips64/ic-mips64.cc |
index 770fa77808dd5ef7631d3aeefd2d3e051f914d54..92bb9706680d61014b47af8dda457f694001f36b 100644 |
--- a/src/ic/mips64/ic-mips64.cc |
+++ b/src/ic/mips64/ic-mips64.cc |
@@ -424,9 +424,9 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
DCHECK(!AreAliased(vector, slot, a4, a5, a6, t1)); |
Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( |
masm->isolate()->factory()->keyed_load_dummy_vector()); |
- int int_slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); |
+ int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); |
__ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex); |
- __ li(slot, Operand(Smi::FromInt(int_slot))); |
+ __ li(slot, Operand(Smi::FromInt(slot_index))); |
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
Code::ComputeHandlerFlags(Code::LOAD_IC)); |
@@ -664,6 +664,20 @@ void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm, |
__ ld(a4, FieldMemOperand(key, HeapObject::kMapOffset)); |
__ lb(a4, FieldMemOperand(a4, Map::kInstanceTypeOffset)); |
__ JumpIfNotUniqueNameInstanceType(a4, &slow); |
+ |
+ if (FLAG_vector_stores) { |
+ // The handlers in the stub cache expect a vector and slot. Since we won't |
+ // change the IC from any downstream misses, a dummy vector can be used. |
+ Register vector = LoadWithVectorDescriptor::VectorRegister(); |
+ Register slot = LoadWithVectorDescriptor::SlotRegister(); |
+ DCHECK(!AreAliased(vector, slot, a3, a4, a5, a6)); |
+ Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( |
+ masm->isolate()->factory()->keyed_store_dummy_vector()); |
+ int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); |
+ __ LoadRoot(vector, Heap::kKeyedStoreDummyVectorRootIndex); |
+ __ li(slot, Operand(Smi::FromInt(slot_index))); |
+ } |
+ |
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
Code::ComputeHandlerFlags(Code::STORE_IC)); |
masm->isolate()->stub_cache()->GenerateProbe( |