Index: src/type-info.cc |
diff --git a/src/type-info.cc b/src/type-info.cc |
index da4d1834421520f5dcbe110c433a57fb6c56d362..65d1364058eaf672d99a583480028a37d4da6030 100644 |
--- a/src/type-info.cc |
+++ b/src/type-info.cc |
@@ -128,6 +128,16 @@ bool TypeFeedbackOracle::LoadIsMonomorphicNormal(Property* expr) { |
} |
+bool TypeFeedbackOracle::LoadIsPreMonomorphic(Property* expr) { |
+ Handle<Object> map_or_code = GetInfo(expr->PropertyFeedbackId()); |
+ if (map_or_code->IsCode()) { |
+ Handle<Code> code = Handle<Code>::cast(map_or_code); |
+ return code->is_inline_cache_stub() && code->ic_state() == PREMONOMORPHIC; |
+ } |
+ return false; |
+} |
+ |
+ |
bool TypeFeedbackOracle::LoadIsPolymorphic(Property* expr) { |
Handle<Object> map_or_code = GetInfo(expr->PropertyFeedbackId()); |
if (map_or_code->IsCode()) { |
@@ -166,6 +176,16 @@ bool TypeFeedbackOracle::StoreIsMonomorphicNormal(TypeFeedbackId ast_id) { |
} |
+bool TypeFeedbackOracle::StoreIsPreMonomorphic(TypeFeedbackId ast_id) { |
+ Handle<Object> map_or_code = GetInfo(ast_id); |
+ if (map_or_code->IsCode()) { |
+ Handle<Code> code = Handle<Code>::cast(map_or_code); |
+ return code->ic_state() == PREMONOMORPHIC; |
+ } |
+ return false; |
+} |
+ |
+ |
bool TypeFeedbackOracle::StoreIsKeyedPolymorphic(TypeFeedbackId ast_id) { |
Handle<Object> map_or_code = GetInfo(ast_id); |
if (map_or_code->IsCode()) { |
@@ -622,12 +642,6 @@ void TypeFeedbackOracle::ProcessRelocInfos(ZoneList<RelocInfo>* infos) { |
case Code::KEYED_LOAD_IC: |
case Code::KEYED_STORE_IC: |
- if (target->ic_state() == MONOMORPHIC || |
- target->ic_state() == POLYMORPHIC) { |
- SetInfo(ast_id, target); |
- } |
- break; |
- |
case Code::BINARY_OP_IC: |
case Code::COMPARE_IC: |
case Code::TO_BOOLEAN_IC: |