[pypy-commit] pypy default: Improve the test in the pre-jit-targets world.

arigo noreply at buildbot.pypy.org
Tue Dec 13 22:29:35 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r50476:f6eb69437a26
Date: 2011-12-13 21:24 +0000
http://bitbucket.org/pypy/pypy/changeset/f6eb69437a26/

Log:	Improve the test in the pre-jit-targets world.

diff --git a/pypy/module/pypyjit/test_pypy_c/test_generators.py b/pypy/module/pypyjit/test_pypy_c/test_generators.py
--- a/pypy/module/pypyjit/test_pypy_c/test_generators.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_generators.py
@@ -6,6 +6,8 @@
         def main(n):
             def f():
                 for i in range(10000):
+                    i -= 1
+                    i -= 42    # ID: subtract
                     yield i
 
             def g():
@@ -24,3 +26,8 @@
             setfield_gc(p45, i29, descr=<SignedFieldDescr .*>)
             jump(..., descr=...)
             """)
+        assert loop.match_by_id("subtract", """
+            setfield_gc(p7, 35, descr=<.*last_instr .*>)      # XXX bad, kill me
+            i2 = int_sub_ovf(i1, 42)
+            guard_no_overflow(descr=...)
+            """)


More information about the pypy-commit mailing list