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

Method writeSyntacticItem

src/main/java/wycc/io/HeapWriter.java:70–83  ·  view source on GitHub ↗
(Item item)

Source from the content-addressed store, hash-verified

68 public abstract void writeHeader() throws IOException;
69
70 public void writeSyntacticItem(Item item) throws IOException {
71 int d = out.length();
72 // Write opcode
73 out.write_u8(item.getOpcode());
74 // Write operands
75 writeOperands(item);
76 // Write data (if any)
77 writeData(item);
78 //
79 int size = out.length() - d;
80 record(item.getOpcode(),size);
81 // Pad to next byte boundary
82 out.pad_u8();
83 }
84
85 private void writeOperands(Item item) throws IOException {
86 // Determine operand layout

Callers 1

writeMethod · 0.95

Calls 7

writeOperandsMethod · 0.95
writeDataMethod · 0.95
recordMethod · 0.95
write_u8Method · 0.80
lengthMethod · 0.65
getOpcodeMethod · 0.65
pad_u8Method · 0.45

Tested by

no test coverage detected