Index: src/type-feedback-vector.cc |
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc |
index ac584ad8a79dcbc42200258f8887f72f502b183a..76c5abf891c43d3ee37accb37f1441e10d37a1c0 100644 |
--- a/src/type-feedback-vector.cc |
+++ b/src/type-feedback-vector.cc |
@@ -161,6 +161,8 @@ const char* TypeFeedbackMetadata::Kind2String(FeedbackVectorSlotKind kind) { |
return "INTERPRETER_BINARYOP_IC"; |
case FeedbackVectorSlotKind::INTERPRETER_COMPARE_IC: |
return "INTERPRETER_COMPARE_IC"; |
+ case FeedbackVectorSlotKind::STORE_DATA_PROPERTY_IN_LITERAL_IC: |
+ return "STORE_DATA_PROPERTY_IN_LITERAL_IC"; |
case FeedbackVectorSlotKind::GENERAL: |
return "STUB"; |
case FeedbackVectorSlotKind::KINDS_NUMBER: |
@@ -316,6 +318,11 @@ void TypeFeedbackVector::ClearSlotsImpl(SharedFunctionInfo* shared, |
} |
break; |
} |
+ case FeedbackVectorSlotKind::STORE_DATA_PROPERTY_IN_LITERAL_IC: { |
+ StoreDataPropertyInLiteralICNexus nexus(this, slot); |
+ nexus.Clear(shared->code()); |
+ break; |
+ } |
case FeedbackVectorSlotKind::INVALID: |
case FeedbackVectorSlotKind::KINDS_NUMBER: |
UNREACHABLE(); |
@@ -987,5 +994,27 @@ CompareOperationHint CompareICNexus::GetCompareOperationFeedback() const { |
return CompareOperationHintFromFeedback(feedback); |
} |
+InlineCacheState StoreDataPropertyInLiteralICNexus::StateFromFeedback() const { |
+ Isolate* isolate = GetIsolate(); |
+ Object* feedback = GetFeedback(); |
+ |
+ if (feedback == *TypeFeedbackVector::UninitializedSentinel(isolate)) { |
+ return UNINITIALIZED; |
+ } else if (feedback->IsWeakCell()) { |
+ // Don't check if the map is cleared. |
+ return MONOMORPHIC; |
+ } |
+ |
+ return MEGAMORPHIC; |
+} |
+ |
+void StoreDataPropertyInLiteralICNexus::ConfigureMonomorphic( |
+ Handle<Name> name, Handle<Map> receiver_map) { |
+ Handle<WeakCell> cell = Map::WeakCellForMap(receiver_map); |
+ |
+ SetFeedback(*cell); |
+ SetFeedbackExtra(*name); |
+} |
+ |
} // namespace internal |
} // namespace v8 |