Index: src/type-info.cc |
diff --git a/src/type-info.cc b/src/type-info.cc |
index ed6d7b74e1385c4ad3a72a57569e44aac1687f3c..a18c65b12a76b680fdb86bf0b4f3f796b9e2aae6 100644 |
--- a/src/type-info.cc |
+++ b/src/type-info.cc |
@@ -156,6 +156,21 @@ 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; |
+ } |
+ } |
+ *key_type = ELEMENT; |
+} |
+ |
+ |
Handle<JSFunction> TypeFeedbackOracle::GetCallTarget( |
FeedbackVectorICSlot slot) { |
Handle<Object> info = GetInfo(slot); |
@@ -305,10 +320,14 @@ bool TypeFeedbackOracle::HasOnlyStringMaps(SmallMapList* receiver_types) { |
void TypeFeedbackOracle::KeyedPropertyReceiverTypes( |
- TypeFeedbackId id, SmallMapList* receiver_types, bool* is_string) { |
+ TypeFeedbackId id, |
+ SmallMapList* receiver_types, |
+ bool* is_string, |
+ IcCheckType* key_type) { |
receiver_types->Clear(); |
CollectReceiverTypes(id, receiver_types); |
*is_string = HasOnlyStringMaps(receiver_types); |
+ GetLoadKeyType(id, key_type); |
} |