Looks good.
https://codereview.chromium.org/650073002/diff/500001/src/ic/ic.cc
File src/ic/ic.cc (right):
https://codereview.chromium.org/650073002/diff/500001/src/ic/ic.cc#newcode1964
src/ic/ic.cc:1964: if (host->type_feedback_info()->IsTypeFeedbackInfo())
{
Can we have a vector without having type_feedback_info()?
DCHECK(vector == host->type_feedback_info()->feedback_vector());
https://codereview.chromium.org/650073002/diff/500001/src/type-feedback-vector-inl.h
File src/type-feedback-vector-inl.h (right):
https://codereview.chromium.org/650073002/diff/500001/src/type-feedback-vector-inl.h#newcode44
src/type-feedback-vector-inl.h:44: int first_ic_slot =
first_ic_slot_index();
If instead of -1, you would make first_ic_slot == length() when there
are no ic_slots, then functions here would be simpler:
Slots(): return Max(0, first_ic_slot_index() - kReservedIndexCount);
ICSlots(): return length() - first_ic_slot_index();
https://codereview.chromium.org/650073002/diff/500001/src/type-feedback-vector-inl.h#newcode70
src/type-feedback-vector-inl.h:70: DCHECK(first_ic_slot >= 0);
DCHECK(slot.ToInt() < ICSlots()) would be more precise.
https://codereview.chromium.org/650073002/diff/500001/src/type-feedback-vector-inl.h#newcode76
src/type-feedback-vector-inl.h:76: DCHECK(index >= kReservedIndexCount);
also DCHECK(index < first_ic_slot_index() || first_ic_slot_index() ==
-1)?
https://codereview.chromium.org/650073002/diff/500001/src/type-feedback-vector-inl.h#newcode82
src/type-feedback-vector-inl.h:82: DCHECK(index >= kReservedIndexCount);
DCHECK(index >= first_ic_slot_index) would be more precise.
also DCHECK(index < length())
https://codereview.chromium.org/650073002/diff/500001/src/type-feedback-vector-inl.h#newcode89
src/type-feedback-vector-inl.h:89: return get(kReservedIndexCount +
slot.ToInt());
Why not use GetIndex(slot) here and below? :)
https://codereview.chromium.org/650073002/diff/500001/src/type-feedback-vector.h
File src/type-feedback-vector.h (right):
https://codereview.chromium.org/650073002/diff/500001/src/type-feedback-vector.h#newcode34
src/type-feedback-vector.h:34: // In a TypeFeedbackVector for ICs, the
first two indexes are reserved
Comment seems out-of-date.
https://codereview.chromium.org/650073002/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.