[pypy-svn] r58166 - pypy/branch/oo-jit/pypy/translator/tool
arigo at codespeak.net
arigo at codespeak.net
Mon Sep 15 11:29:38 CEST 2008
Author: arigo
Date: Mon Sep 15 11:29:31 2008
New Revision: 58166
Modified:
pypy/branch/oo-jit/pypy/translator/tool/make_dot.py
Log:
Allow an edge "port" specification.
Modified: pypy/branch/oo-jit/pypy/translator/tool/make_dot.py
==============================================================================
--- pypy/branch/oo-jit/pypy/translator/tool/make_dot.py (original)
+++ pypy/branch/oo-jit/pypy/translator/tool/make_dot.py Mon Sep 15 11:29:31 2008
@@ -55,12 +55,17 @@
dir="forward",
weight="5",
constraint="true",
+ headport="", tailport="",
):
+ # the ports are used to force on which side of the node the
+ # edge should be attached; for example ":s" means south
+ # of (i.e. below) the node box.
d = locals()
attrs = [('%s="%s"' % (x, d[x].replace('"', '\\"').replace('\n', '\\n')))
for x in ['label', 'style', 'color', 'dir', 'weight', 'constraint']]
self.emit('edge [%s];' % ", ".join(attrs))
- self.emit('%s -> %s' % (safename(name1), safename(name2)))
+ self.emit('%s%s -> %s%s' % (safename(name1), tailport,
+ safename(name2), headport))
def emit_node(self, name,
shape="diamond",
More information about the Pypy-commit
mailing list