Author: Carl Friedrich Bolz <[email protected]>
Branch: list-strategies
Changeset: r47823:ef71640445f3
Date: 2011-10-04 15:02 +0200
http://bitbucket.org/pypy/pypy/changeset/ef71640445f3/

Log:    for some reason some of the list fields are not cached across the
        loop. is this due to the opaque pointer restriction of the short
        preambles?

diff --git a/pypy/module/pypyjit/test_pypy_c/test_misc.py 
b/pypy/module/pypyjit/test_pypy_c/test_misc.py
--- a/pypy/module/pypyjit/test_pypy_c/test_misc.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_misc.py
@@ -201,9 +201,11 @@
         assert log.result == 1000000
         loop, = log.loops_by_filename(self.filepath)
         assert loop.match("""
-            i16 = int_ge(i12, i13)
+            i14 = getfield_gc(p12, descr=<SignedFieldDescr list.length 4>)
+            i16 = uint_ge(i12, i14)
             guard_false(i16, descr=...)
-            p17 = getarrayitem_gc(p15, i12, descr=<GcPtrArrayDescr>)
+            p16 = getfield_gc(p12, descr=<GcPtrFieldDescr list.items 8>)
+            p17 = getarrayitem_gc(p16, i12, descr=<GcPtrArrayDescr>)
             i19 = int_add(i12, 1)
             setfield_gc(p9, i19, descr=<SignedFieldDescr 
.*W_AbstractSeqIterObject.inst_index .*>)
             guard_nonnull_class(p17, 146982464, descr=...)
@@ -217,7 +219,7 @@
             i28 = int_add_ovf(i10, i25)
             guard_no_overflow(descr=...)
             --TICK--
-            jump(p0, p1, p2, p3, p4, p5, p6, i28, i25, p9, p10, p11, i19, i13, 
p14, p15, descr=<Loop0>)
+            jump(p0, p1, p2, p3, p4, p5, p6, i28, i25, p9, p10, p11, p12, i19, 
descr=<Loop0>)
         """)
 
 
@@ -329,4 +331,4 @@
             guard_false(i28, descr=...)
             i30 = int_lshift(i20, 24)
             i31 = int_or(i26, i30)
-        """ % {"32_bit_only": extra})
\ No newline at end of file
+        """ % {"32_bit_only": extra})
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to