[pypy-svn] r78195 - in pypy/trunk/pypy/module: array pypyjit/test

arigo at codespeak.net arigo at codespeak.net
Fri Oct 22 13:09:22 CEST 2010


Author: arigo
Date: Fri Oct 22 13:09:20 2010
New Revision: 78195

Modified:
   pypy/trunk/pypy/module/array/interp_array.py
   pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py
Log:
On 64-bit machines, consider 'I' to fit in a Signed too.


Modified: pypy/trunk/pypy/module/array/interp_array.py
==============================================================================
--- pypy/trunk/pypy/module/array/interp_array.py	(original)
+++ pypy/trunk/pypy/module/array/interp_array.py	Fri Oct 22 13:09:20 2010
@@ -323,7 +323,7 @@
         idx, stop, step = space.decode_index(w_idx, self.len)
         assert step == 0
         item = self.buffer[idx]
-        if mytype.typecode in 'bBhHil':
+        if mytype.canoverflow:    # if it fits in a Signed
             item = rffi.cast(lltype.Signed, item)
         elif mytype.typecode == 'f':
             item = float(item)

Modified: pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py
==============================================================================
--- pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py	(original)
+++ pypy/trunk/pypy/module/pypyjit/test/test_pypy_c.py	Fri Oct 22 13:09:20 2010
@@ -837,6 +837,9 @@
         # XXX this test is way too imprecise in what it is actually testing
         # it should count the number of guards instead
         for tc, maxops in zip('ilILd', (67, 67, 69, 69, 61)):
+            print
+            print '='*65
+            print '='*20, 'running test for tc=%r' % (tc,), '='*20
             res = 73574560
             if tc in 'IL':
                 res = long(res)



More information about the Pypy-commit mailing list