MCPcopy Create free account
hub / github.com/cretz/stackparam / parse_code

Method parse_code

src/bytecode/io/reader.rs:311–329  ·  view source on GitHub ↗
(len: usize, reader: &mut BlockReader)

Source from the content-addressed store, hash-verified

309 }
310
311 fn parse_code(len: usize, reader: &mut BlockReader) -> Vec<Instruction> {
312 /*
313 let read_bytes: Cell<usize> = Cell::new(0);
314
315 (0..len).take_while(|_| read_bytes.get() < len).map(|_| {
316 let instruction = ClassReader::parse_instruction(reader, read_bytes.get());
317
318 read_bytes.set(read_bytes.get() + instruction.len());
319 instruction
320 }).collect()*/
321 let read_bytes: Cell<usize> = Cell::new(0);
322
323 (0..len).take_while(|_| read_bytes.get() < len).map(|_| {
324 let instruction = ClassReader::parse_instruction(reader, read_bytes.get());
325
326 read_bytes.set(reader.position());
327 instruction
328 }).collect()
329 }
330
331 fn parse_instruction(reader: &mut BlockReader, current_offset: usize) -> Instruction {
332 let opcode = reader.get_u8();

Callers

nothing calls this directly

Calls 1

positionMethod · 0.80

Tested by

no test coverage detected