diff options
author | Iru Cai <mytbk920423@gmail.com> | 2014-11-27 15:28:21 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2014-11-27 15:28:21 +0800 |
commit | e2324d5aeeafa6a77dfb5d4588b06edd0c1f2d06 (patch) | |
tree | 3a423fe2607a323728971708ec3e3670f4ae061f /src/spiglet/spiglet2kanga/SpgStmt.java | |
parent | 97af84d976c704992562f695272a553ff6fac1be (diff) | |
download | minijava-e2324d5aeeafa6a77dfb5d4588b06edd0c1f2d06.tar.xz |
print def&use
Diffstat (limited to 'src/spiglet/spiglet2kanga/SpgStmt.java')
-rw-r--r-- | src/spiglet/spiglet2kanga/SpgStmt.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/spiglet/spiglet2kanga/SpgStmt.java b/src/spiglet/spiglet2kanga/SpgStmt.java index 4f2ffb2..e6298dc 100644 --- a/src/spiglet/spiglet2kanga/SpgStmt.java +++ b/src/spiglet/spiglet2kanga/SpgStmt.java @@ -83,4 +83,23 @@ public class SpgStmt extends SpgSym{ } } + + public void printDefUse() { + if (def!=null) { + System.err.print("def: "); + SpgTemp[] d = def.toArray(new SpgTemp[0]); + for (int i=0; i<d.length; i++) { + System.err.print(d[i].num+" "); + } + } + System.err.println(); + if (use!=null) { + System.err.print("use: "); + SpgTemp[] u = use.toArray(new SpgTemp[0]); + for (int i=0; i<u.length; i++) { + System.err.print(u[i].num+" "); + } + } + System.err.println(); + } } |