(N node, CFG<N> cfg)
| 77 | } |
| 78 | |
| 79 | public static <N> String toLabel(N node, CFG<N> cfg) { |
| 80 | if (cfg.isEntry(node)) { |
| 81 | return "Entry" + cfg.getMethod(); |
| 82 | } else if (cfg.isExit(node)) { |
| 83 | return "Exit" + cfg.getMethod(); |
| 84 | } else { |
| 85 | return node instanceof Stmt ? |
| 86 | ((Stmt) node).getIndex() + ": " + node.toString().replace("\"", "\\\"") : |
| 87 | node.toString(); |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | private static String toDotFileName(CFG<?> cfg) { |
| 92 | JMethod m = cfg.getMethod(); |