Reviewers: Weiliang,

Message:
PTAL

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

port 9e7af9efc5857b3c7e23a77d257f3dfbea597753 (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=

Please review this at https://codereview.chromium.org/1212653011/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+18, -0 lines):
  M src/ic/x87/ic-x87.cc


Index: src/ic/x87/ic-x87.cc
diff --git a/src/ic/x87/ic-x87.cc b/src/ic/x87/ic-x87.cc
index ee236a6301ab1e0f01239b8da9fbb64a86abc733..139f133abda3003f48a4b146ab293c3c84ce44c1 100644
--- a/src/ic/x87/ic-x87.cc
+++ b/src/ic/x87/ic-x87.cc
@@ -553,10 +553,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);



--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to