MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / readItem

Method readItem

src/main/java/wycc/io/HeapReader.java:80–91  ·  view source on GitHub ↗
(Schema schema)

Source from the content-addressed store, hash-verified

78 protected abstract Schema checkHeader() throws IOException;
79
80 protected Bytecode readItem(Schema schema) throws IOException {
81 // read opcode
82 int opcode = in.read_u8();
83 // Write operands
84 int[] operands = readOperands(schema,opcode);
85 // Write data (if any)
86 byte[] data = readData(schema,opcode);
87 // Pad to next byte boundary
88 in.pad_u8();
89 //
90 return new Bytecode(opcode,operands,data);
91 }
92
93 protected int[] readOperands(Schema schema, int opcode) throws IOException {
94 // Determine operand layout

Callers 1

readItemsMethod · 0.95

Calls 4

readOperandsMethod · 0.95
readDataMethod · 0.95
read_u8Method · 0.80
pad_u8Method · 0.45

Tested by

no test coverage detected