Lines Matching refs:byte
55 Decoder(const byte* start, const byte* end, uint32_t buffer_offset = 0)
57 explicit Decoder(const base::Vector<const byte> bytes,
60 Decoder(const byte* start, const byte* pc, const byte* end,
71 bool validate_size(const byte* pc, uint32_t length, const char* msg) {
82 uint8_t read_u8(const byte* pc, const char* msg = "expected 1 byte") {
88 uint16_t read_u16(const byte* pc, const char* msg = "expected 2 bytes") {
94 uint32_t read_u32(const byte* pc, const char* msg = "expected 4 bytes") {
100 uint64_t read_u64(const byte* pc, const char* msg = "expected 8 bytes") {
106 uint32_t read_u32v(const byte* pc, uint32_t* length,
113 int32_t read_i32v(const byte* pc, uint32_t* length,
120 uint64_t read_u64v(const byte* pc, uint32_t* length,
127 int64_t read_i64v(const byte* pc, uint32_t* length,
134 int64_t read_i33v(const byte* pc, uint32_t* length,
141 WasmOpcode read_prefixed_opcode(const byte* pc) {
148 // *including* the prefix byte. For most opcodes, it will be 2.
150 WasmOpcode read_prefixed_opcode(const byte* pc, uint32_t* length,
156 *length += 1; // Prefix byte.
158 // bigger will need 1 more byte, and the '<< 8' below will be wrong.
169 // Reads a 8-bit unsigned integer (byte) and advances {pc_}.
286 void traceByteRange(const byte* start, const byte* end) {
288 for (const byte* p = start; p < end; ++p) TRACE("%02x ", *p);
308 void Reset(const byte* start, const byte* end, uint32_t buffer_offset = 0) {
327 const byte* start() const { return start_; }
328 const byte* pc() const { return pc_; }
346 const byte* end() const { return end_; }
347 void set_end(const byte* end) { end_ = end; }
349 // Check if the byte at {offset} from the current pc equals {expected}.
350 bool lookahead(int offset, byte expected) {
356 const byte* start_;
357 const byte* pc_;
358 const byte* end_;
376 IntType read_little_endian(const byte* pc, const char* msg) {
402 V8_INLINE IntType read_leb(const byte* pc, uint32_t* length,
407 // Fast path for single-byte integers.
428 V8_NOINLINE IntType read_leb_slowpath(const byte* pc, uint32_t* length,
437 V8_INLINE IntType read_leb_tail(const byte* pc, uint32_t* length,
445 byte b = 0;
455 // Make sure that we only instantiate the template for valid byte indexes.
474 // A signed-LEB128 must sign-extend the final byte, excluding its
482 const byte checked_bits = b & (0xFF << kSignExtBits);
483 constexpr byte kSignExtendedExtraBits = 0x7f & (0xFF << kSignExtBits);