Lines Matching refs:pc_
36 pc_(start), in Decoder()
42 pc_(pc), in Decoder()
145 TRACE(" +%d %-20s: ", static_cast<int>(pc_ - start_),
148 byte val = *(pc_++);
157 TRACE(" +%d %-20s: ", static_cast<int>(pc_ - start_),
160 uint16_t val = read_u16(pc_);
161 TRACE("%02x %02x = %d\n", pc_[0], pc_[1], val);
162 pc_ += 2;
170 TRACE(" +%d %-20s: ", static_cast<int>(pc_ - start_),
173 uint32_t val = read_u32(pc_);
174 TRACE("%02x %02x %02x %02x = %u\n", pc_[0], pc_[1], pc_[2], pc_[3], val);
175 pc_ += 4;
196 TRACE(" +%d %-20s: %d bytes\n", static_cast<int>(pc_ - start_), name,
201 pc_ += size;
203 pc_ = end_;
210 if (size < 0 || (intptr_t)pc_ > pc_overflow_value) { in checkAvailable()
211 error(pc_, nullptr, "reading %d bytes would underflow/overflow", size); in checkAvailable()
213 } else if (pc_ < start_ || end_ < (pc_ + size)) { in checkAvailable()
214 error(pc_, nullptr, "expected %d bytes, fell off end", size); in checkAvailable()
221 void error(const char* msg) { error(pc_, nullptr, "%s", msg); } in error()
254 for (const byte* ptr = pc_; ptr < end_; ptr++) { in traceOffEnd()
258 pc_ = end_; in traceOffEnd()
284 pc_ = start; in Reset()
293 bool more() const { return pc_ < end_; } in more()
296 const byte* pc() const { return pc_; } in pc()
297 uint32_t pc_offset() const { return static_cast<uint32_t>(pc_ - start_); } in pc_offset()
302 const byte* pc_; variable
364 TRACE(" +%d %-20s: ", static_cast<int>(pc_ - start_),
368 const byte* pos = pc_;
369 const byte* end = pc_ + kMaxLength;
375 while (pc_ < end) {
376 b = *pc_++;
383 int length = static_cast<int>(pc_ - pos);
384 if (pc_ == end && (b & 0x80)) {
386 error(pc_ - 1, "varint too large");
389 error(pc_, "varint of length 0");