Return a pointer to the first byte in the range "[start..limit)" whose value is 0 or 255 (kEscape1 or kEscape2). If no such byte exists in the range, returns "limit".
| 142 | // whose value is 0 or 255 (kEscape1 or kEscape2). If no such byte |
| 143 | // exists in the range, returns "limit". |
| 144 | inline const char* SkipToNextSpecialByte(const char* start, const char* limit) { |
| 145 | // If these constants were ever changed, this routine needs to change |
| 146 | DCHECK_EQ(kEscape1, 0); |
| 147 | DCHECK_EQ(kEscape2 & 0xffu, 255u); |
| 148 | const char* p = start; |
| 149 | while (p < limit && !IsSpecialByte(*p)) { |
| 150 | p++; |
| 151 | } |
| 152 | return p; |
| 153 | } |
| 154 | |
| 155 | // Expose SkipToNextSpecialByte for testing purposes |
| 156 | const char* OrderedCode::TEST_SkipToNextSpecialByte(const char* start, |
no test coverage detected