summaryrefslogtreecommitdiff
path: root/vaporize/library
diff options
context:
space:
mode:
Diffstat (limited to 'vaporize/library')
-rw-r--r--vaporize/library/CFGSimp.java18
-rw-r--r--vaporize/library/Node.java38
2 files changed, 9 insertions, 47 deletions
diff --git a/vaporize/library/CFGSimp.java b/vaporize/library/CFGSimp.java
index 6ab276a..3a612bd 100644
--- a/vaporize/library/CFGSimp.java
+++ b/vaporize/library/CFGSimp.java
@@ -5,7 +5,7 @@ import st.*;
import misc.*;
import java.util.*;
-public class CFGSimp<P, R> extends VInstr.VisitorPR<P, R, RuntimeException> {
+public class CFGSimp extends VInstr.VisitorPR<String, String, RuntimeException> {
private ControlFlowGraph cfg;
@@ -29,36 +29,36 @@ public class CFGSimp<P, R> extends VInstr.VisitorPR<P, R, RuntimeException> {
return this.cfg;
}
- public R visit(P p, VMemRead n) throws RuntimeException {
+ public String visit(String p, VMemRead n) throws RuntimeException {
return null;
}
- public R visit(P p, VMemWrite n) throws RuntimeException {
+ public String visit(String p, VMemWrite n) throws RuntimeException {
return null;
}
- public R visit(P p, VAssign n) throws RuntimeException {
+ public String visit(String p, VAssign n) throws RuntimeException {
return null;
}
- public R visit(P p, VBranch n) throws RuntimeException {
+ public String visit(String p, VBranch n) throws RuntimeException {
// two edges
return null;
}
- public R visit(P p, VGoto n) throws RuntimeException {
+ public String visit(String p, VGoto n) throws RuntimeException {
return null;
}
- public R visit(P p, VCall n) throws RuntimeException {
+ public String visit(String p, VCall n) throws RuntimeException {
return null;
}
- public R visit(P p, VBuiltIn n) throws RuntimeException {
+ public String visit(String p, VBuiltIn n) throws RuntimeException {
return null;
}
- public R visit(P p, VReturn n) throws RuntimeException {
+ public String visit(String p, VReturn n) throws RuntimeException {
return null;
}
diff --git a/vaporize/library/Node.java b/vaporize/library/Node.java
deleted file mode 100644
index 203f931..0000000
--- a/vaporize/library/Node.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package vaporize.library;
-
-import cs132.vapor.ast.*;
-import java.util.ArrayList;
-
-class Node {
-
- private VInstr instruction;
- private ArrayList<Node> sources;
- private ArrayList<Node> dests;
-
- protected Node(VInstr instruction) {
- this.instruction = instruction;
- this.sources = new ArrayList<>();
- this.dests = new ArrayList<>();
- }
-
- protected void addSource(Node node) {
- this.sources.add(node);
- }
-
- protected void addDest(Node node) {
- this.dests.add(node);
- }
-
- protected VInstr getInstruction() {
- return this.instruction;
- }
-
- protected ArrayList<Node> getSources() {
- return this.sources;
- }
-
- protected ArrayList<Node> getDests() {
- return this.dests;
- }
-
-}