Chromium Code Reviews| Index: src/type-feedback-vector.cc |
| diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc |
| index e8993dd44e6b646608828882a8bcab68c37ef2dc..f2f5596d9fa1031bb7396d1ac28fe13fb4879d7f 100644 |
| --- a/src/type-feedback-vector.cc |
| +++ b/src/type-feedback-vector.cc |
| @@ -125,6 +125,34 @@ Handle<TypeFeedbackVector> TypeFeedbackVector::Allocate(Isolate* isolate, |
| } |
| +template int TypeFeedbackVector::GetIndexFromSpec(const ZoneFeedbackVectorSpec*, |
| + FeedbackVectorICSlot); |
| +template int TypeFeedbackVector::GetIndexFromSpec(const ZoneFeedbackVectorSpec*, |
| + FeedbackVectorSlot); |
| + |
| + |
| +// static |
| +template <typename Spec> |
| +int TypeFeedbackVector::GetIndexFromSpec(const Spec* spec, |
|
Jakob Kummerow
2015/09/25 13:08:05
As discussed, I'd advocate to combine this with th
|
| + FeedbackVectorSlot slot) { |
| + const int ic_slot_count = spec->ic_slots(); |
| + const int index_count = VectorICComputer::word_count(ic_slot_count); |
| + return kReservedIndexCount + index_count + slot.ToInt(); |
| +} |
| + |
| + |
| +// static |
| +template <typename Spec> |
| +int TypeFeedbackVector::GetIndexFromSpec(const Spec* spec, |
| + FeedbackVectorICSlot slot) { |
| + const int slot_count = spec->slots(); |
| + const int ic_slot_count = spec->ic_slots(); |
| + const int index_count = VectorICComputer::word_count(ic_slot_count); |
| + return kReservedIndexCount + index_count + slot_count + |
| + slot.ToInt() * elements_per_ic_slot(); |
| +} |
| + |
| + |
| // static |
| int TypeFeedbackVector::PushAppliedArgumentsIndex() { |
| const int index_count = VectorICComputer::word_count(1); |