Lines Matching defs:length

59       : Decoder(bytes.begin(), bytes.begin() + bytes.length(), buffer_offset) {}
70 // Ensures there are at least {length} bytes left to read, starting at {pc}.
71 bool validate_size(const byte* pc, uint32_t length, const char* msg) {
73 if (V8_UNLIKELY(pc > end_ || length > static_cast<uint32_t>(end_ - pc))) {
104 // Reads a variable-length unsigned integer (little endian).
106 uint32_t read_u32v(const byte* pc, uint32_t* length,
108 return read_leb<uint32_t, validate, kNoTrace>(pc, length, name);
111 // Reads a variable-length signed integer (little endian).
113 int32_t read_i32v(const byte* pc, uint32_t* length,
115 return read_leb<int32_t, validate, kNoTrace>(pc, length, name);
118 // Reads a variable-length unsigned integer (little endian).
120 uint64_t read_u64v(const byte* pc, uint32_t* length,
122 return read_leb<uint64_t, validate, kNoTrace>(pc, length, name);
125 // Reads a variable-length signed integer (little endian).
127 int64_t read_i64v(const byte* pc, uint32_t* length,
129 return read_leb<int64_t, validate, kNoTrace>(pc, length, name);
132 // Reads a variable-length 33-bit signed integer (little endian).
134 int64_t read_i33v(const byte* pc, uint32_t* length,
136 return read_leb<int64_t, validate, kNoTrace, 33>(pc, length, name);
139 // Convenient overload for callers who don't care about length.
146 // Reads a prefixed-opcode, possibly with variable-length index.
147 // `length` is set to the number of bytes that make up this opcode,
150 WasmOpcode read_prefixed_opcode(const byte* pc, uint32_t* length,
155 index = read_u32v<validate>(pc + 1, length, "prefixed opcode index");
156 *length += 1; // Prefix byte.
163 *length = 0;
184 // Reads a LEB128 variable-length unsigned 32-bit integer and advances {pc_}.
186 uint32_t length = 0;
188 read_leb<uint32_t, kFullValidation, kTrace>(pc_, &length, name);
189 pc_ += length;
193 // Reads a LEB128 variable-length signed 32-bit integer and advances {pc_}.
195 uint32_t length = 0;
197 read_leb<int32_t, kFullValidation, kTrace>(pc_, &length, name);
198 pc_ += length;
202 // Reads a LEB128 variable-length unsigned 64-bit integer and advances {pc_}.
204 uint32_t length = 0;
206 read_leb<uint64_t, kFullValidation, kTrace>(pc_, &length, name);
207 pc_ += length;
211 // Reads a LEB128 variable-length signed 64-bit integer and advances {pc_}.
213 uint32_t length = 0;
215 read_leb<int64_t, kFullValidation, kTrace>(pc_, &length, name);
216 pc_ += length;
402 V8_INLINE IntType read_leb(const byte* pc, uint32_t* length,
410 *length = 1;
422 return read_leb_slowpath<IntType, validate, trace, size_in_bits>(pc, length,
428 V8_NOINLINE IntType read_leb_slowpath(const byte* pc, uint32_t* length,
431 return read_leb_tail<IntType, validate, trace, size_in_bits, 0>(pc, length,
437 V8_INLINE IntType read_leb_tail(const byte* pc, uint32_t* length,
460 next_byte_index>(pc + 1, length, name, result);
462 *length = byte_index + (at_end ? 0 : 1);
464 TRACE_IF(trace, at_end ? "<end> " : "<length overflow> ");
471 *length = 0;
496 *length = 0;