[pypy-commit] pypy reverse-debugger: hg merge default
arigo
pypy.commits at gmail.com
Fri Jul 1 18:17:59 EDT 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: reverse-debugger
Changeset: r85508:496ddf1997fe
Date: 2016-07-01 23:33 +0200
http://bitbucket.org/pypy/pypy/changeset/496ddf1997fe/
Log: hg merge default
diff --git a/rpython/translator/tool/make_dot.py b/rpython/translator/tool/make_dot.py
--- a/rpython/translator/tool/make_dot.py
+++ b/rpython/translator/tool/make_dot.py
@@ -51,7 +51,7 @@
ports=None,
):
d = locals()
- attrs = [('%s="%s"' % (x, _quote(d[x])))
+ attrs = [('%s="%s"' % (x, d[x].replace('"', '\\"').replace('\n', '\\n')))
for x in ['label', 'style', 'color', 'dir', 'weight']]
self.emit('edge [%s];' % ", ".join(attrs))
if ports:
@@ -69,7 +69,7 @@
width="0.75",
):
d = locals()
- attrs = [('%s="%s"' % (x, _quote(d[x])))
+ attrs = [('%s="%s"' % (x, d[x].replace('"', '\\"').replace('\n', '\\n')))
for x in ['shape', 'label', 'color', 'fillcolor', 'style', 'width']]
self.emit('%s [%s];' % (safename(name), ", ".join(attrs)))
@@ -193,7 +193,7 @@
name2 = self.blockname(link.target)
label = " ".join(map(repr, link.args))
if link.exitcase is not None:
- label = "%s: %s" %(_quote(repr(link.exitcase)), label)
+ label = "%s: %s" %(repr(link.exitcase).replace('\\', '\\\\'), label)
self.emit_edge(name, name2, label, style="dotted", color="red")
else:
self.emit_edge(name, name2, label, style="solid")
@@ -237,6 +237,3 @@
# not a keyword
name = ''.join([CHAR_MAP[c] for c in name])
return '_' + name
-
-def _quote(s):
- return s.replace('\\', '\\\\').replace('"', '\\"').replace('\n', '\\n')
More information about the pypy-commit
mailing list