diff options
Diffstat (limited to 'V2VM.java')
-rw-r--r-- | V2VM.java | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -27,18 +27,17 @@ public class V2VM { VaporProgram prog = parseVapor(System.in, System.out); - ControlFlowGraph cfg = new ControlFlowGraph(); - CFGSimp<String, Void> cfg_vis = new CFGSimp<String, Void>(cfg); - - for (VFunction f : prog.functions) - for (VInstr s : f.body) - s.accept("", cfg_vis); + ArrayList<ControlFlowGraph> cfgs = new ArrayList<ControlFlowGraph>(); + for (VFunction f : prog.functions) { + CFGSimp<String, Void> cfg = new CFGSimp<String, Void>(f); + cfgs.add(cfg.getCFG()); + } SpillEverywhere<String, Void> se = new SpillEverywhere<String, Void>(strProg); - for (VFunction f : prog.functions) - for (VInstr s : f.body) - s.accept("", se); + // for (VFunction f : prog.functions) + // for (VInstr s : f.body) + // s.accept("", se); } catch (IOException e) { System.out.println(e.toString()); |