| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 132c72cf81ad31afef8b413e01e19d2d1a17e52d..cb30303bc506266db7c0fa3df16f105429e7a7e6 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -10609,18 +10609,18 @@ void Code::ClearInlineCaches(Code::Kind* kind) {
|
| }
|
|
|
|
|
| -void Code::ClearTypeFeedbackCells(Heap* heap) {
|
| +void Code::ClearTypeFeedbackInfo(Heap* heap) {
|
| if (kind() != FUNCTION) return;
|
| 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++) {
|
| - Cell* cell = type_feedback_cells->GetCell(i);
|
| - // Don't clear AllocationSites
|
| - Object* value = cell->value();
|
| - if (value == NULL || !value->IsAllocationSite()) {
|
| - cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap));
|
| + FixedArray* feedback_vector =
|
| + TypeFeedbackInfo::cast(raw_info)->feedback_vector();
|
| + for (int i = 0; i < feedback_vector->length(); i++) {
|
| + Object* obj = feedback_vector->get(i);
|
| + if (!obj->IsAllocationSite()) {
|
| + // TODO(mvstanton): Can't I avoid a write barrier for this sentinel?
|
| + feedback_vector->set(i,
|
| + TypeFeedbackInfo::RawUninitializedSentinel(heap));
|
| }
|
| }
|
| }
|
|
|