summaryrefslogtreecommitdiff
path: root/V2VM.java
diff options
context:
space:
mode:
Diffstat (limited to 'V2VM.java')
-rw-r--r--V2VM.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/V2VM.java b/V2VM.java
index 6a0645b..a234db6 100644
--- a/V2VM.java
+++ b/V2VM.java
@@ -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());