Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.object/src/com/oracle/truffle/object/debug/GraphvizShapeVisitor.java @ 22356:364bab1763c9
add option for dumping shapes to a DOT file
author | Andreas Woess <andreas.woess@oracle.com> |
---|---|
date | Tue, 10 Nov 2015 19:59:29 +0100 |
parents | dc83cc1f94f2 |
children |
comparison
equal
deleted
inserted
replaced
22355:ef3c3b62e0fc | 22356:364bab1763c9 |
---|---|
40 } | 40 } |
41 | 41 |
42 @Override | 42 @Override |
43 public GraphvizShapeVisitor visitShape(Shape shape, Map<? extends Transition, ? extends Shape> transitions) { | 43 public GraphvizShapeVisitor visitShape(Shape shape, Map<? extends Transition, ? extends Shape> transitions) { |
44 if (!drawn.add(shape)) { | 44 if (!drawn.add(shape)) { |
45 return null; | 45 return this; |
46 } | 46 } |
47 | 47 |
48 String prefix = "s"; | 48 String prefix = "s"; |
49 sb.append(prefix).append(getId(shape)); | 49 sb.append(prefix).append(getId(shape)); |
50 sb.append(" [label=\""); | 50 sb.append(" [label=\""); |