Index: src/ic/ic-inl.h |
diff --git a/src/ic/ic-inl.h b/src/ic/ic-inl.h |
index e10fb456ce5cc6a8bdc75216a99a59749537b884..91b8955fd47ca08b7eb2cd6d63aa788cf67efb23 100644 |
--- a/src/ic/ic-inl.h |
+++ b/src/ic/ic-inl.h |
@@ -208,17 +208,26 @@ Handle<Map> IC::GetICCacheHolder(HeapType* type, Isolate* isolate, |
} |
-IC::State CallIC::FeedbackToState(Handle<TypeFeedbackVector> vector, |
- Handle<Smi> slot) const { |
+inline Code* CallIC::get_host() { |
+ return isolate() |
+ ->inner_pointer_to_code_cache() |
+ ->GetCacheEntry(address()) |
+ ->code; |
+} |
+ |
+ |
+// static |
+IC::State CallIC::FeedbackToState(Isolate* isolate, TypeFeedbackVector* vector, |
+ FeedbackVectorICSlot slot) { |
IC::State state = UNINITIALIZED; |
- Object* feedback = vector->get(slot->value()); |
+ Object* feedback = vector->Get(slot); |
- if (feedback == *TypeFeedbackVector::MegamorphicSentinel(isolate())) { |
+ if (feedback == *TypeFeedbackVector::MegamorphicSentinel(isolate)) { |
state = GENERIC; |
} else if (feedback->IsAllocationSite() || feedback->IsJSFunction()) { |
state = MONOMORPHIC; |
} else { |
- CHECK(feedback == *TypeFeedbackVector::UninitializedSentinel(isolate())); |
+ CHECK(feedback == *TypeFeedbackVector::UninitializedSentinel(isolate)); |
} |
return state; |