# HG changeset patch # User Gilles Duboscq # Date 1321452831 -3600 # Node ID 441d68905702841ade97a53c3cfeab144e9b40a6 # Parent 8093b8a2a76d0260660685db5c6ee82cdab6d661# Parent ce5841053fc9853d0de654a3b1c73160d1e21a6b Merge diff -r 8093b8a2a76d -r 441d68905702 src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalCFGFilter.java --- a/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalCFGFilter.java Wed Nov 16 13:56:48 2011 +0100 +++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/GraalCFGFilter.java Wed Nov 16 15:13:51 2011 +0100 @@ -41,28 +41,34 @@ } public void apply(Diagram d) { - List
figures = d.getFigures(); Set
figuresToRemove = new HashSet
(); Set connectionsToRemove = new HashSet(); - for (Figure f : figures) { - Properties p = f.getProperties(); - final String prop = p.get("probability"); + for (Figure f : d.getFigures()) { + final String prop = f.getProperties().get("probability"); if (prop == null) { figuresToRemove.add(f); } - + } + d.removeAllFigures(figuresToRemove); + + for (Figure f : d.getFigures()) { + Properties p = f.getProperties(); int predCount = Integer.parseInt(p.get("predecessorCount")); for (InputSlot is : f.getInputSlots()) { - Color color; - if (is.getPosition() >= predCount) { - connectionsToRemove.addAll(is.getConnections()); + if (is.getPosition() >= predCount && !"EndNode".equals(is.getProperties().get("class"))) { + for (Connection c : is.getConnections()) { + if (!"EndNode".equals(c.getOutputSlot().getFigure().getProperties().get("class"))) { + connectionsToRemove.add(c); + } + } } } } - d.removeAllFigures(figuresToRemove); + for (Connection c : connectionsToRemove) { c.remove(); + System.out.println("rm " + c); } } }