[pypy-svn] pypy default: ignore force_tokens in this two tests
antocuni
commits-noreply at bitbucket.org
Fri Apr 15 11:54:45 CEST 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r43383:02ea09544fc9
Date: 2011-04-15 11:45 +0200
http://bitbucket.org/pypy/pypy/changeset/02ea09544fc9/
Log: ignore force_tokens in this two tests
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
@@ -153,10 +153,10 @@
for op in self._ops_for_chunk(chunk, include_debug_merge_points):
yield op
- def match(self, expected_src):
+ def match(self, expected_src, **kwds):
ops = list(self.allops())
matcher = OpMatcher(ops, src=self.format_ops())
- return matcher.match(expected_src)
+ return matcher.match(expected_src, **kwds)
def match_by_id(self, id, expected_src, **kwds):
ops = list(self.ops_by_id(id, **kwds))
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
@@ -1360,31 +1360,29 @@
#
# The force_token()s are still there, but will be eliminated by the
# backend regalloc, so they are harmless
- assert loop.match("""
+ assert loop.match(ignore_ops=['force_token'],
+ expected_src="""
...
i20 = int_ge(i18, i8)
guard_false(i20, descr=...)
f21 = getarrayitem_raw(i13, i18, descr=...)
- i22 = force_token()
f23 = getarrayitem_raw(i13, i14, descr=...)
f24 = float_add(f21, f23)
- i25 = force_token()
f26 = getarrayitem_raw(i13, i6, descr=...)
f27 = float_add(f24, f26)
i29 = int_add(i6, 1)
- i30 = force_token()
i31 = int_ge(i29, i8)
guard_false(i31, descr=...)
f33 = getarrayitem_raw(i13, i29, descr=...)
f34 = float_add(f27, f33)
i36 = int_add(i6, 2)
- i37 = force_token()
i38 = int_ge(i36, i8)
guard_false(i38, descr=...)
f39 = getarrayitem_raw(i13, i36, descr=...)
...
""")
+
def test_circular(self):
def main():
from array import array
@@ -1412,23 +1410,20 @@
#
# The force_token()s are still there, but will be eliminated by the
# backend regalloc, so they are harmless
- assert loop.match("""
+ assert loop.match(ignore_ops=['force_token'],
+ expected_src="""
...
i17 = int_and(i14, 255)
f18 = getarrayitem_raw(i8, i17, descr=...)
- i19 = force_token()
f20 = getarrayitem_raw(i8, i9, descr=...)
f21 = float_add(f18, f20)
- i22 = force_token()
f23 = getarrayitem_raw(i8, i10, descr=...)
f24 = float_add(f21, f23)
i26 = int_add(i6, 1)
- i27 = force_token()
i29 = int_and(i26, 255)
f30 = getarrayitem_raw(i8, i29, descr=...)
f31 = float_add(f24, f30)
i33 = int_add(i6, 2)
- i34 = force_token()
i36 = int_and(i33, 255)
f37 = getarrayitem_raw(i8, i36, descr=...)
...
More information about the Pypy-commit
mailing list