Reviewers: Jakob,

Message:
Hi Jakob, could you have a look? Thanks,
--Michael

Description:
Follow-on to hydrogen fix keyed loads with string keys for vector ics.

r25817 optimized hydrogen keyed loads with string keys.
(https://codereview.chromium.org/755513003).
This CL adapts that work for the vector-ic keyed load.

BUG=

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

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

Affected files (+6, -5 lines):
  M src/type-info.h
  M src/type-info.cc
  M src/typing.cc


Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index a18c65b12a76b680fdb86bf0b4f3f796b9e2aae6..611373f86547dbcdbc7a6dea9fd12b1baae4fb8d 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -342,11 +342,13 @@ void TypeFeedbackOracle::PropertyReceiverTypes(FeedbackVectorICSlot slot,


 void TypeFeedbackOracle::KeyedPropertyReceiverTypes(
- FeedbackVectorICSlot slot, SmallMapList* receiver_types, bool* is_string) { + FeedbackVectorICSlot slot, SmallMapList* receiver_types, bool* is_string,
+    IcCheckType* key_type) {
   receiver_types->Clear();
   KeyedLoadICNexus nexus(feedback_vector_, slot);
   CollectReceiverTypes<FeedbackNexus>(&nexus, receiver_types);
   *is_string = HasOnlyStringMaps(receiver_types);
+  *key_type = nexus.FindFirstName() != NULL ? PROPERTY : ELEMENT;
 }


Index: src/type-info.h
diff --git a/src/type-info.h b/src/type-info.h
index 9753ff06d9a519c44e912cb116864d92a5f40e6b..60f156f5f3da7dc980c28c7fd8dad3c4b6212c15 100644
--- a/src/type-info.h
+++ b/src/type-info.h
@@ -51,8 +51,8 @@ class TypeFeedbackOracle: public ZoneObject {
                                   bool* is_string,
                                   IcCheckType* key_type);
   void KeyedPropertyReceiverTypes(FeedbackVectorICSlot slot,
-                                  SmallMapList* receiver_types,
-                                  bool* is_string);
+ SmallMapList* receiver_types, bool* is_string,
+                                  IcCheckType* key_type);
   void AssignmentReceiverTypes(TypeFeedbackId id,
                                Handle<String> name,
                                SmallMapList* receiver_types);
Index: src/typing.cc
diff --git a/src/typing.cc b/src/typing.cc
index 88c530eeee7bca2a38d78c187b8384fb1f5ed5f9..17deb6db42d1ca085cf121cca55c0e6e0e257996 100644
--- a/src/typing.cc
+++ b/src/typing.cc
@@ -510,8 +510,7 @@ void AstTyper::VisitProperty(Property* expr) {
       IcCheckType key_type;
       if (FLAG_vector_ics) {
oracle()->KeyedPropertyReceiverTypes(slot, expr->GetReceiverTypes(),
-                                             &is_string);
-        key_type = ELEMENT;
+                                             &is_string, &key_type);
       } else {
         oracle()->KeyedPropertyReceiverTypes(id, expr->GetReceiverTypes(),
                                              &is_string, &key_type);


--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to