[pypy-svn] pypy default: bah, actually *check* that the loop matches, and fix an annoying typo (*kwds vs **kwds)
antocuni
commits-noreply at bitbucket.org
Wed Mar 16 18:06:33 CET 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r42718:8ed9cb7b58c3
Date: 2011-03-16 14:49 +0100
http://bitbucket.org/pypy/pypy/changeset/8ed9cb7b58c3/
Log: bah, actually *check* that the loop matches, and fix an annoying
typo (*kwds vs **kwds)
diff --git a/pypy/module/pypyjit/test_pypy_c/model.py b/pypy/module/pypyjit/test_pypy_c/model.py
--- a/pypy/module/pypyjit/test_pypy_c/model.py
+++ b/pypy/module/pypyjit/test_pypy_c/model.py
@@ -159,7 +159,7 @@
return matcher.match(expected_src)
def match_by_id(self, id, expected_src, **kwds):
- ops = list(self.ops_by_id(id, *kwds))
+ ops = list(self.ops_by_id(id, **kwds))
matcher = OpMatcher(ops, src=self.format_ops(id))
return matcher.match(expected_src)
diff --git a/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py b/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
--- a/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_pypy_c_new.py
@@ -494,19 +494,20 @@
for i in range(n): # ID: for
tmp = g(n)
s += tmp[i] # ID: getitem
+ a = 0
return s
#
log = self.run(main, [1000], threshold=400)
assert log.result == 1000 * 999 / 2
loop, = log.loops_by_filename(self.filepath)
- loop.match_by_id('getitem', opcode='BINARY_SUBSCR', expected_src="""
+ assert loop.match_by_id('getitem', opcode='BINARY_SUBSCR', expected_src="""
i43 = int_lt(i25, 0)
guard_false(i43, descr=<Guard9>)
i44 = int_ge(i25, i39)
guard_false(i44, descr=<Guard10>)
i45 = int_mul(i25, i33)
""")
- loop.match_by_id('for', opcode='FOR_ITER', expected_src="""
+ assert loop.match_by_id('for', opcode='FOR_ITER', expected_src="""
i23 = int_ge(i11, i12)
guard_false(i23, descr=<Guard3>)
i24 = int_mul(i11, i14)
More information about the Pypy-commit
mailing list