Index: src/ic/arm64/ic-arm64.cc |
diff --git a/src/ic/arm64/ic-arm64.cc b/src/ic/arm64/ic-arm64.cc |
index e0bf48b26008f3d3a44faa56ba65f7e35be9318d..e8ce317f0d4c8c58eadaac93d468a761975b4741 100644 |
--- a/src/ic/arm64/ic-arm64.cc |
+++ b/src/ic/arm64/ic-arm64.cc |
@@ -397,9 +397,9 @@ static void GenerateKeyedLoadWithNameKey(MacroAssembler* masm, Register key, |
DCHECK(!AreAliased(vector, slot, scratch1, scratch2, scratch3, scratch4)); |
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); |
- __ Mov(slot, Operand(Smi::FromInt(int_slot))); |
+ __ Mov(slot, Operand(Smi::FromInt(slot_index))); |
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
Code::ComputeHandlerFlags(Code::LOAD_IC)); |
@@ -663,6 +663,20 @@ void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm, |
__ Ldr(x10, FieldMemOperand(key, HeapObject::kMapOffset)); |
__ Ldrb(x10, FieldMemOperand(x10, Map::kInstanceTypeOffset)); |
__ JumpIfNotUniqueNameInstanceType(x10, &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 = VectorStoreICDescriptor::VectorRegister(); |
+ Register slot = VectorStoreICDescriptor::SlotRegister(); |
+ DCHECK(!AreAliased(vector, slot, x3, x4, x5, x6)); |
+ 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); |
+ __ Mov(slot, Operand(Smi::FromInt(slot_index))); |
+ } |
+ |
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
Code::ComputeHandlerFlags(Code::STORE_IC)); |
masm->isolate()->stub_cache()->GenerateProbe( |