private State state;
+ private BufferedWriter flatbw;
+
+ private HashSet<FlatNode> visited;
+ private HashSet<FlatNode> toVisit;
+
+ private int labelindex;
+ private Hashtable<FlatNode, Integer> flatnodetolabel;
+
public FlatIRGraph(State state, boolean tasks, boolean usermethods, boolean libmethods) throws java.io.IOException {
this.state=state;
}
}
-
-
- static BufferedWriter flatbw;
-
- static HashSet<FlatNode> visited;
- static HashSet<FlatNode> toVisit;
-
- static int labelindex;
- static Hashtable<FlatNode, Integer> flatnodetolabel;
-
-
- static public void writeFlatIRGraph(FlatMethod fm, String graphname) throws java.io.IOException {
-
-
-
+ private void writeFlatIRGraph(FlatMethod fm, String graphname) throws java.io.IOException {
// give every node in the flat IR graph a unique label
// so a human being can inspect the graph and verify
// correctness
flatbw.close();
}
-
- static private void labelFlatNodes(FlatNode fn) {
+ private void labelFlatNodes(FlatNode fn) {
visited.add(fn);
flatnodetolabel.put(fn,new Integer(labelindex++));
for(int i=0; i<fn.numNext(); i++) {
}
}
-
- static private String makeNodeName(String graphname, Integer id, String type) {
+ private String makeNodeName(String graphname, Integer id, String type) {
String s = String.format("%05d", id);
return "FN"+s+"_"+type;
}
- static private String makeDotNodeDec(String graphname, Integer id, String type, String details) {
+ private String makeDotNodeDec(String graphname, Integer id, String type, String details) {
if( details == null ) {
return " node"+id+"[label=\""+makeNodeName(graphname,id,type)+"\"];\n";
} else {