Index: src/type-feedback-vector.cc |
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc |
index 7b7b434f5600154d45b7eba03c37bed8eeb375b7..9d7169e9d6a988406d2b0d255d47df6153c2d3ed 100644 |
--- a/src/type-feedback-vector.cc |
+++ b/src/type-feedback-vector.cc |
@@ -109,6 +109,8 @@ const char* TypeFeedbackMetadata::Kind2String(FeedbackVectorSlotKind kind) { |
return "INVALID"; |
case FeedbackVectorSlotKind::CALL_IC: |
return "CALL_IC"; |
+ case FeedbackVectorSlotKind::CONSTRUCT_IC: |
+ return "CONSTRUCT_IC"; |
case FeedbackVectorSlotKind::LOAD_IC: |
return "LOAD_IC"; |
case FeedbackVectorSlotKind::KEYED_LOAD_IC: |
@@ -222,6 +224,11 @@ void TypeFeedbackVector::ClearSlotsImpl(SharedFunctionInfo* shared, |
nexus.Clear(shared->code()); |
break; |
} |
+ case FeedbackVectorSlotKind::CONSTRUCT_IC: { |
+ ConstructICNexus nexus(this, slot); |
+ nexus.Clear(shared->code()); |
+ break; |
+ } |
case FeedbackVectorSlotKind::LOAD_IC: { |
LoadICNexus nexus(this, slot); |
nexus.Clear(shared->code()); |
@@ -485,6 +492,18 @@ InlineCacheState CallICNexus::StateFromFeedback() const { |
} |
+Handle<Object> CallICNexus::GetCallFeedback() { |
+ Object* feedback = GetFeedback(); |
+ if (feedback->IsWeakCell()) { |
+ feedback = WeakCell::cast(feedback)->value(); |
+ } |
+ if (!feedback->IsJSFunction() && !feedback->IsAllocationSite()) { |
+ feedback = GetIsolate()->heap()->undefined_value(); |
+ } |
+ return handle(feedback, GetIsolate()); |
+} |
+ |
+ |
int CallICNexus::ExtractCallCount() { |
Object* call_count = GetFeedbackExtra(); |
if (call_count->IsSmi()) { |
@@ -498,6 +517,11 @@ int CallICNexus::ExtractCallCount() { |
void CallICNexus::Clear(Code* host) { CallIC::Clear(GetIsolate(), host, this); } |
+void ConstructICNexus::Clear(Code* host) { |
+ ConstructIC::Clear(GetIsolate(), host, this); |
+} |
+ |
+ |
void CallICNexus::ConfigureMonomorphicArray() { |
Object* feedback = GetFeedback(); |
if (!feedback->IsAllocationSite()) { |