Chromium Code Reviews| Index: src/type-info.cc |
| diff --git a/src/type-info.cc b/src/type-info.cc |
| index bffeccfbc19810e3742e185fe6e9b489edaf2f3a..f338f8411c6e2445db16a130fe4f1c14434b6141 100644 |
| --- a/src/type-info.cc |
| +++ b/src/type-info.cc |
| @@ -83,7 +83,7 @@ Handle<Object> TypeFeedbackOracle::GetInfo(FeedbackVectorICSlot slot) { |
| } |
| if (obj->IsJSFunction() || obj->IsAllocationSite() || obj->IsSymbol() || |
| - obj->IsSimd128Value()) { |
| + obj->IsSimd128Value() || (FLAG_vector_stores && obj->IsMap())) { |
|
mvstanton
2015/08/28 08:25:28
I refactored StoreIsUninitialized(FeedbackVectorIC
|
| return Handle<Object>(obj, isolate()); |
| } |
| @@ -131,6 +131,16 @@ bool TypeFeedbackOracle::StoreIsUninitialized(TypeFeedbackId ast_id) { |
| } |
| +bool TypeFeedbackOracle::StoreIsUninitialized(FeedbackVectorICSlot slot) { |
| + if (slot.IsInvalid()) return true; |
| + |
| + Handle<Object> value = GetInfo(slot); |
| + return value->IsUndefined() || |
| + value.is_identical_to( |
| + TypeFeedbackVector::UninitializedSentinel(isolate())); |
| +} |
| + |
| + |
| bool TypeFeedbackOracle::CallIsUninitialized(FeedbackVectorICSlot slot) { |
| Handle<Object> value = GetInfo(slot); |
| return value->IsUndefined() || |
| @@ -180,18 +190,17 @@ void TypeFeedbackOracle::GetStoreModeAndKeyType( |
| } |
| -void TypeFeedbackOracle::GetLoadKeyType( |
| - TypeFeedbackId ast_id, IcCheckType* key_type) { |
| - Handle<Object> maybe_code = GetInfo(ast_id); |
| - if (maybe_code->IsCode()) { |
| - Handle<Code> code = Handle<Code>::cast(maybe_code); |
| - if (code->kind() == Code::KEYED_LOAD_IC) { |
| - ExtraICState extra_ic_state = code->extra_ic_state(); |
| - *key_type = KeyedLoadIC::GetKeyType(extra_ic_state); |
| - return; |
| - } |
| +void TypeFeedbackOracle::GetStoreModeAndKeyType( |
| + FeedbackVectorICSlot slot, KeyedAccessStoreMode* store_mode, |
| + IcCheckType* key_type) { |
| + if (!slot.IsInvalid()) { |
| + KeyedStoreICNexus nexus(feedback_vector_, slot); |
| + *store_mode = nexus.GetKeyedAccessStoreMode(); |
| + *key_type = nexus.GetKeyType(); |
| + } else { |
| + *store_mode = STANDARD_STORE; |
| + *key_type = ELEMENT; |
| } |
| - *key_type = ELEMENT; |
| } |
| @@ -366,6 +375,15 @@ void TypeFeedbackOracle::AssignmentReceiverTypes(TypeFeedbackId id, |
| } |
| +void TypeFeedbackOracle::AssignmentReceiverTypes(FeedbackVectorICSlot slot, |
| + Handle<Name> name, |
| + SmallMapList* receiver_types) { |
| + receiver_types->Clear(); |
| + Code::Flags flags = Code::ComputeHandlerFlags(Code::STORE_IC); |
| + CollectReceiverTypes(slot, name, flags, receiver_types); |
| +} |
| + |
| + |
| void TypeFeedbackOracle::KeyedAssignmentReceiverTypes( |
| TypeFeedbackId id, SmallMapList* receiver_types, |
| KeyedAccessStoreMode* store_mode, IcCheckType* key_type) { |
| @@ -375,6 +393,15 @@ void TypeFeedbackOracle::KeyedAssignmentReceiverTypes( |
| } |
| +void TypeFeedbackOracle::KeyedAssignmentReceiverTypes( |
| + FeedbackVectorICSlot slot, SmallMapList* receiver_types, |
| + KeyedAccessStoreMode* store_mode, IcCheckType* key_type) { |
| + receiver_types->Clear(); |
| + CollectReceiverTypes(slot, receiver_types); |
| + GetStoreModeAndKeyType(slot, store_mode, key_type); |
| +} |
| + |
| + |
| void TypeFeedbackOracle::CountReceiverTypes(TypeFeedbackId id, |
| SmallMapList* receiver_types) { |
| receiver_types->Clear(); |
| @@ -382,6 +409,15 @@ void TypeFeedbackOracle::CountReceiverTypes(TypeFeedbackId id, |
| } |
| +void TypeFeedbackOracle::CollectReceiverTypes(FeedbackVectorICSlot slot, |
| + Handle<Name> name, |
| + Code::Flags flags, |
| + SmallMapList* types) { |
| + StoreICNexus nexus(feedback_vector_, slot); |
| + CollectReceiverTypes<FeedbackNexus>(&nexus, name, flags, types); |
| +} |
| + |
| + |
| void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id, |
| Handle<Name> name, |
| Code::Flags flags, |
| @@ -419,6 +455,13 @@ void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id, |
| } |
| +void TypeFeedbackOracle::CollectReceiverTypes(FeedbackVectorICSlot slot, |
| + SmallMapList* types) { |
| + KeyedStoreICNexus nexus(feedback_vector_, slot); |
| + CollectReceiverTypes<FeedbackNexus>(&nexus, types); |
| +} |
| + |
| + |
| template <class T> |
| void TypeFeedbackOracle::CollectReceiverTypes(T* obj, SmallMapList* types) { |
| MapHandleList maps; |