Commit efd1f3ea authored by mvstanton's avatar mvstanton Committed by Commit bot

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=

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

Cr-Commit-Position: refs/heads/master@{#25903}
parent bc0d2e23
......@@ -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;
}
......
......@@ -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);
......
......@@ -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);
......
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