Chromium Code Reviews| Index: src/objects.cc |
| diff --git a/src/objects.cc b/src/objects.cc |
| index 11c8ffcacdd5483351e8915cd8261f95b861eceb..c351a52f1700657758fdb31a419f382226bc31e3 100644 |
| --- a/src/objects.cc |
| +++ b/src/objects.cc |
| @@ -10648,19 +10648,15 @@ void Code::ClearInlineCaches(Code::Kind* kind) { |
| } |
| -void Code::ClearTypeFeedbackInfo(Heap* heap) { |
| - if (kind() != FUNCTION) return; |
| - Object* raw_info = type_feedback_info(); |
| - if (raw_info->IsTypeFeedbackInfo()) { |
| - 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)); |
| - } |
| +void SharedFunctionInfo::ClearTypeFeedbackInfo(Heap* heap) { |
| + FixedArray* vector = feedback_vector(); |
| + for (int i = 0; i < vector->length(); i++) { |
| + Object* obj = vector->get(i); |
| + if (!obj->IsAllocationSite()) { |
|
Benedikt Meurer
2014/03/05 07:22:56
Unrelated to this CL, but... Do we really want to
mvstanton
2014/03/05 08:48:02
Indeed, per our discussion, I'll try and remove th
|
| + ASSERT(heap->the_hole_value() == |
| + TypeFeedbackInfo::RawUninitializedSentinel(heap)); |
|
Benedikt Meurer
2014/03/05 07:22:56
Nit: Please add a comment that this ASSERT is only
mvstanton
2014/03/05 08:48:02
Done.
|
| + vector->set(i, TypeFeedbackInfo::RawUninitializedSentinel(heap), |
| + SKIP_WRITE_BARRIER); |
| } |
| } |
| } |