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

Method run

src/main/java/wyc/Compiler.java:123–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121 }
122
123 public boolean run() throws IOException {
124 List<WhileyFile> whileyfiles = new ArrayList<>();
125 // Read source files
126 for (Trie sf : sources) {
127 WhileyFile wf = readWhileyFile(whileydir, sf);
128 whileyfiles.add(wf);
129 }
130 ArrayList<WyilFile> deps = new ArrayList<>(this.dependencies);
131 // Extract any dependencies from zips
132 for(File dep : whileypath) {
133 extractDependencies(dep,deps);
134 }
135 // Compile WyilFile
136 CompileTask task = new CompileTask(target, deps).setStrict(strict).setLinking(linking);
137 Pair<WyilFile, Boolean> r = task.compile(whileyfiles);
138 // Read out binary file from build repository
139 WyilFile binary = r.first();
140 // Print out syntactic markers
141 writeSyntacticMarkers(mailbox,binary);
142 // Write generated WyIL file
143 writeWyilFile(wyildir,target,binary);
144 //
145 return r.second() && binary.isValid();
146 }
147
148 /**
149 * Command-line options

Callers 1

mainMethod · 0.95

Calls 11

readWhileyFileMethod · 0.95
extractDependenciesMethod · 0.95
compileMethod · 0.95
writeSyntacticMarkersMethod · 0.95
writeWyilFileMethod · 0.95
isValidMethod · 0.95
firstMethod · 0.80
secondMethod · 0.80
addMethod · 0.65
setLinkingMethod · 0.45
setStrictMethod · 0.45

Tested by

no test coverage detected