[pypy-commit] pypy default: improve the message not to get too annoyed
fijal
noreply at buildbot.pypy.org
Thu Aug 9 22:42:49 CEST 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r56666:756cbdf37781
Date: 2012-08-09 22:42 +0200
http://bitbucket.org/pypy/pypy/changeset/756cbdf37781/
Log: improve the message not to get too annoyed
diff --git a/pypy/translator/backendopt/removeassert.py b/pypy/translator/backendopt/removeassert.py
--- a/pypy/translator/backendopt/removeassert.py
+++ b/pypy/translator/backendopt/removeassert.py
@@ -41,7 +41,19 @@
log.removeassert("removed %d asserts in %s" % (count, graph.name))
checkgraph(graph)
#transform_dead_op_vars(graph, translator)
- log.removeassert("Could not remove %d asserts, but removed %d asserts." % tuple(total_count))
+ total_count = tuple(total_count)
+ if total_count[0] == 0:
+ if total_count[1] == 0:
+ msg = None
+ else:
+ msg = "Removed %d asserts" % (total_count[1],)
+ else:
+ if total_count[1] == 0:
+ msg = "Could not remove %d asserts" % (total_count[0],)
+ else:
+ msg = "Could not remove %d asserts, but removed %d asserts." % total_count
+ if msg is not None:
+ log.removeassert(msg)
def kill_assertion_link(graph, link):
More information about the pypy-commit
mailing list