Index: src/type-info.cc |
diff --git a/src/type-info.cc b/src/type-info.cc |
index 3bc509a6189a93068ee2f50b6f0a90d9aeffef67..6cda351dd8a7c5152f4cbbccd9644a2dc9782757 100644 |
--- a/src/type-info.cc |
+++ b/src/type-info.cc |
@@ -541,6 +541,7 @@ TypeInfo TypeFeedbackOracle::IncrementType(CountOperation* expr) { |
static void AddMapIfMissing(Handle<Map> map, SmallMapList* list, |
Zone* zone) { |
+ map = Map::Update(map); |
for (int i = 0; i < list->length(); ++i) { |
if (list->at(i).is_identical_to(map)) return; |
} |
@@ -574,7 +575,7 @@ void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id, |
// we need a generic store (or load) here. |
ASSERT(Handle<Code>::cast(object)->ic_state() == GENERIC); |
} else if (object->IsMap()) { |
- types->Add(Handle<Map>::cast(object), zone()); |
+ AddMapIfMissing(Handle<Map>::cast(object), types, zone()); |
} else if (Handle<Code>::cast(object)->ic_state() == POLYMORPHIC) { |
CollectPolymorphicMaps(Handle<Code>::cast(object), types); |
} else if (FLAG_collect_megamorphic_maps_from_stub_cache && |
@@ -582,7 +583,7 @@ void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id, |
types->Reserve(4, zone()); |
ASSERT(object->IsCode()); |
isolate_->stub_cache()->CollectMatchingMaps(types, |
- *name, |
+ name, |
flags, |
native_context_, |
zone()); |