[pypy-commit] pypy default: bah, test&fix for a bug introduced by 065c98a10f0d (commit message: "that way easy" :-))
antocuni
noreply at buildbot.pypy.org
Fri Jul 22 09:51:09 CEST 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r45859:0a106042ba51
Date: 2011-07-22 09:50 +0200
http://bitbucket.org/pypy/pypy/changeset/0a106042ba51/
Log: bah, test&fix for a bug introduced by 065c98a10f0d (commit message:
"that way easy" :-))
diff --git a/pypy/tool/jitlogparser/parser.py b/pypy/tool/jitlogparser/parser.py
--- a/pypy/tool/jitlogparser/parser.py
+++ b/pypy/tool/jitlogparser/parser.py
@@ -37,7 +37,7 @@
return self._is_guard
def repr(self):
- args = self.args
+ args = self.args[:]
if self.descr is not None:
args.append('descr=%s' % self.descr)
arglist = ', '.join(args)
diff --git a/pypy/tool/jitlogparser/test/test_parser.py b/pypy/tool/jitlogparser/test/test_parser.py
--- a/pypy/tool/jitlogparser/test/test_parser.py
+++ b/pypy/tool/jitlogparser/test/test_parser.py
@@ -1,6 +1,6 @@
from pypy.tool.jitlogparser.parser import (SimpleParser, TraceForOpcode,
Function, adjust_bridges,
- import_log)
+ import_log, Op)
from pypy.tool.jitlogparser.storage import LoopStorage
import py, sys
@@ -225,3 +225,9 @@
assert 'cmp' in loops[1].operations[1].asm
# bridge
assert 'jo' in loops[3].operations[3].asm
+
+def test_Op_repr_is_pure():
+ op = Op('foobar', ['a', 'b'], 'c', 'mydescr')
+ myrepr = 'c = foobar(a, b, descr=mydescr)'
+ assert op.repr() == myrepr
+ assert op.repr() == myrepr # do it twice
More information about the pypy-commit
mailing list