Index: src/ast.cc |
diff --git a/src/ast.cc b/src/ast.cc |
index 03df229963ec00771500449589e04640e657c2df..4580db5ca96f9523e8e25a14ea8ffa27fde39ba6 100644 |
--- a/src/ast.cc |
+++ b/src/ast.cc |
@@ -607,6 +607,9 @@ void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
is_string_access_ = true; |
} else if (is_monomorphic_) { |
monomorphic_receiver_type_ = oracle->LoadMonomorphicReceiverType(this); |
+ } else if (oracle->LoadIsMegamorphicWithTypeInfo(this)) { |
+ receiver_types_ = new ZoneMapList(kMaxKeyedPolymorphism); |
+ oracle->CollectKeyedReceiverTypes(this->id(), receiver_types_); |
} |
} |
@@ -622,8 +625,11 @@ void Assignment::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
ZoneMapList* types = oracle->StoreReceiverTypes(this, name); |
receiver_types_ = types; |
} else if (is_monomorphic_) { |
- // Record receiver type for monomorphic keyed loads. |
+ // Record receiver type for monomorphic keyed stores. |
monomorphic_receiver_type_ = oracle->StoreMonomorphicReceiverType(this); |
+ } else if (oracle->StoreIsMegamorphicWithTypeInfo(this)) { |
+ receiver_types_ = new ZoneMapList(kMaxKeyedPolymorphism); |
+ oracle->CollectKeyedReceiverTypes(this->id(), receiver_types_); |
} |
} |
@@ -631,8 +637,11 @@ void Assignment::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
void CountOperation::RecordTypeFeedback(TypeFeedbackOracle* oracle) { |
is_monomorphic_ = oracle->StoreIsMonomorphicNormal(this); |
if (is_monomorphic_) { |
- // Record receiver type for monomorphic keyed loads. |
+ // Record receiver type for monomorphic keyed stores. |
monomorphic_receiver_type_ = oracle->StoreMonomorphicReceiverType(this); |
+ } else if (oracle->StoreIsMegamorphicWithTypeInfo(this)) { |
+ receiver_types_ = new ZoneMapList(kMaxKeyedPolymorphism); |
+ oracle->CollectKeyedReceiverTypes(this->id(), receiver_types_); |
} |
} |