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

Method write

src/main/java/wycc/io/HeapWriter.java:53–66  ·  view source on GitHub ↗
(Syntactic.Heap module)

Source from the content-addressed store, hash-verified

51 }
52
53 public void write(Syntactic.Heap module) throws IOException {
54 // first, write magic number
55 writeHeader();
56 // second, write syntactic items
57 out.write_uv(module.size());
58 // third, write root item
59 out.write_uv(module.getRootItem().getIndex());
60 // Write out each item in turn
61 for (int i = 0; i != module.size(); ++i) {
62 writeSyntacticItem(module.getSyntacticItem(i));
63 }
64 // finally, flush to disk
65 out.flush();
66 }
67
68 public abstract void writeHeader() throws IOException;
69

Callers

nothing calls this directly

Calls 8

writeHeaderMethod · 0.95
writeSyntacticItemMethod · 0.95
write_uvMethod · 0.80
flushMethod · 0.80
sizeMethod · 0.65
getIndexMethod · 0.65
getRootItemMethod · 0.65
getSyntacticItemMethod · 0.65

Tested by

no test coverage detected