Lines Matching refs:cutoff
241 // This usually a faster alternative to ReadTag() when cutoff is a manifest
242 // constant. It does particularly well for cutoff >= 127. The first part
245 // then the tag is known to be in [0, cutoff]. If not, the tag either is
246 // above cutoff or is 0. (There's intentional wiggle room when tag is 0,
249 inline std::pair<uint32, bool> ReadTagWithCutoff(uint32 cutoff)
890 uint32 cutoff) {
891 // In performance-sensitive code we can expect cutoff to be a compile-time
892 // constant, and things like "cutoff >= kMax1ByteVarint" to be evaluated at
902 return make_pair(tag, cutoff >= kMax1ByteVarint || tag <= cutoff);
904 // Other hot case: cutoff >= 0x80, buffer_ has at least two bytes available,
907 if (cutoff >= 0x80 &&
918 // it exceeds cutoff.
919 bool at_or_below_cutoff = cutoff >= kMax2ByteVarint || tag <= cutoff;
925 return make_pair(last_tag_, static_cast<uint32>(last_tag_ - 1) < cutoff);