Commit 29686a2b authored by chunyang.dai's avatar chunyang.dai Committed by Commit bot

X87: Vector ICs: Like megamorphic keyed koads, use a dummy vector for stores.

port 9e7af9ef (r29280).

original commit message:

    It's useful for the megamorphic keyed store case to not require a
    vector and slot as input. Analogous to the load case, we have a dummy
    one-ic-slot vector to aid. Since the only kind of MISS is for
    megamorphic cache stub failures, we don't need the real vector.
    The reason is that megamorphic cache stub failures don't result in any
    change to the type feedback vector state.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29410}
parent f80fd372
......@@ -560,10 +560,28 @@ void KeyedStoreIC::GenerateMegamorphic(MacroAssembler* masm,
__ mov(ebx, FieldOperand(key, HeapObject::kMapOffset));
__ movzx_b(ebx, FieldOperand(ebx, Map::kInstanceTypeOffset));
__ JumpIfNotUniqueNameInstanceType(ebx, &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.
Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast(
masm->isolate()->factory()->keyed_store_dummy_vector());
int slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0));
__ push(Immediate(Smi::FromInt(slot)));
__ push(Immediate(dummy_vector));
}
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
Code::ComputeHandlerFlags(Code::STORE_IC));
masm->isolate()->stub_cache()->GenerateProbe(
masm, Code::STORE_IC, flags, false, receiver, key, ebx, no_reg);
if (FLAG_vector_stores) {
__ pop(VectorStoreICDescriptor::VectorRegister());
__ pop(VectorStoreICDescriptor::SlotRegister());
}
// Cache miss.
__ jmp(&miss);
......
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