package spiglet.spiglet2kanga; import java.util.HashMap; import java.util.Vector; public class SpgProc extends SpgSym { String name; int argCount; int stkCount; int maxCallArgCount; public Vector statements; public SpgSimpExpr retexp; public SpgProc(String s, int n) { name = s; argCount = n; statements = new Vector(); } public void addStmt(SpgStmt s) { statements.addElement(s); } public void printProc() { System.err.println(name + "[" + argCount + "]"); for (int i=0; i s = new HashMap(); for (int i=0; i=0; i--) { SpgStmt st = statements.elementAt(i); // first, reset the out[] set if (st.succ1!=null) { modified |= st.out.addAll(st.succ1.in); } if (st.succ2!=null) { modified |= st.out.addAll(st.succ2.in); } st.in.clear(); st.in.addAll(st.out); if (st.def!=null) { st.in.removeAll(st.def); } if (st.use!=null) { st.in.addAll(st.use); } } } } }