Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 083a332f1c6cf369e896d6cda3027c08e7937469..970fc24550878072e45297bd6c0601a576165ba3 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -8320,6 +8320,20 @@ void Code::ClearInlineCaches() { |
} |
+void Code::ClearTypeFeedbackCells(Heap* heap) { |
+ Object* raw_info = type_feedback_info(); |
+ if (raw_info->IsTypeFeedbackInfo()) { |
+ TypeFeedbackCells* type_feedback_cells = |
+ TypeFeedbackInfo::cast(raw_info)->type_feedback_cells(); |
+ for (int i = 0; i < type_feedback_cells->CellCount(); i++) { |
+ ASSERT(type_feedback_cells->AstId(i)->IsSmi()); |
+ JSGlobalPropertyCell* cell = type_feedback_cells->Cell(i); |
+ cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap)); |
+ } |
+ } |
+} |
+ |
+ |
#ifdef ENABLE_DISASSEMBLER |
void DeoptimizationInputData::DeoptimizationInputDataPrint(FILE* out) { |