Index: src/type-info.cc |
diff --git a/src/type-info.cc b/src/type-info.cc |
index 36a2dd124073a5d863bb9660103cf7dca817905b..59850c7fc53ca751f755c6524b0ffe496f7bc417 100644 |
--- a/src/type-info.cc |
+++ b/src/type-info.cc |
@@ -225,8 +225,8 @@ bool TypeFeedbackOracle::ObjectLiteralStoreIsMonomorphic( |
} |
-byte TypeFeedbackOracle::ForInType(ForInStatement* stmt) { |
- Handle<Object> value = GetInfo(stmt->ForInFeedbackId()); |
+byte TypeFeedbackOracle::ForInType(TypeFeedbackId id) { |
+ Handle<Object> value = GetInfo(id); |
return value->IsSmi() && |
Smi::cast(*value)->value() == TypeFeedbackCells::kForInFastCaseMarker |
? ForInStatement::FAST_FOR_IN : ForInStatement::SLOW_FOR_IN; |
@@ -444,8 +444,8 @@ Handle<Type> TypeFeedbackOracle::ClauseType(TypeFeedbackId id) { |
} |
-Handle<Type> TypeFeedbackOracle::IncrementType(CountOperation* expr) { |
- Handle<Object> object = GetInfo(expr->CountBinOpFeedbackId()); |
+Handle<Type> TypeFeedbackOracle::CountType(TypeFeedbackId id) { |
+ Handle<Object> object = GetInfo(id); |
Handle<Type> unknown(Type::None(), isolate_); |
if (!object->IsCode()) return unknown; |
Handle<Code> code = Handle<Code>::cast(object); |
@@ -456,6 +456,21 @@ Handle<Type> TypeFeedbackOracle::IncrementType(CountOperation* expr) { |
} |
+void TypeFeedbackOracle::CountReceiverTypes( |
+ TypeFeedbackId id, SmallMapList* receiver_types) { |
+ receiver_types->Clear(); |
+ if (StoreIsMonomorphicNormal(id)) { |
+ // Record receiver type for monomorphic keyed stores. |
+ receiver_types->Add(StoreMonomorphicReceiverType(id), zone()); |
+ } else if (StoreIsKeyedPolymorphic(id)) { |
+ receiver_types->Reserve(kMaxKeyedPolymorphism, zone()); |
+ CollectKeyedReceiverTypes(id, receiver_types); |
+ } else { |
+ CollectPolymorphicStoreReceiverTypes(id, receiver_types); |
+ } |
+} |
+ |
+ |
void TypeFeedbackOracle::CollectPolymorphicMaps(Handle<Code> code, |
SmallMapList* types) { |
MapHandleList maps; |