Index: src/ic/ic.cc |
diff --git a/src/ic/ic.cc b/src/ic/ic.cc |
index 6e6f8e50cfbd538a3ea6426d74e97c8062168c95..d65a7c6430f41018973b52dffab7d69c8e4ab652 100644 |
--- a/src/ic/ic.cc |
+++ b/src/ic/ic.cc |
@@ -475,6 +475,7 @@ void IC::Clear(Isolate* isolate, Address address, Address constant_pool) { |
case Code::COMPARE_NIL_IC: |
return CompareNilIC::Clear(address, target, constant_pool); |
case Code::CALL_IC: // CallICs are vector-based and cleared differently. |
+ case Code::CONSTRUCT_IC: |
case Code::BINARY_OP_IC: |
case Code::TO_BOOLEAN_IC: |
// Clearing these is tricky and does not |
@@ -510,6 +511,19 @@ void CallIC::Clear(Isolate* isolate, Code* host, CallICNexus* nexus) { |
} |
+void ConstructIC::Clear(Isolate* isolate, Code* host, ConstructICNexus* nexus) { |
+ // Determine our state. |
+ Object* feedback = nexus->vector()->Get(nexus->slot()); |
+ State state = nexus->StateFromFeedback(); |
+ |
+ if (state != UNINITIALIZED && !feedback->IsAllocationSite()) { |
+ nexus->ConfigureUninitialized(); |
+ // The change in state must be processed. |
+ OnTypeFeedbackChanged(isolate, host, nexus->vector(), state, UNINITIALIZED); |
+ } |
+} |
+ |
+ |
void LoadIC::Clear(Isolate* isolate, Code* host, LoadICNexus* nexus) { |
if (IsCleared(nexus)) return; |
State state = nexus->StateFromFeedback(); |