[pypy-svn] r65176 - pypy/branch/pyjitpl5/pypy/jit/backend/x86

fijal at codespeak.net fijal at codespeak.net
Sat May 9 03:55:55 CEST 2009


Author: fijal
Date: Sat May  9 03:55:54 2009
New Revision: 65176

Modified:
   pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py
Log:
Bah. Hack differently.


Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/runner.py	Sat May  9 03:55:54 2009
@@ -587,7 +587,7 @@
         assert isinstance(A, lltype.GcArray)
         basesize, itemsize, ofs_length = symbolic.get_array_token(A,
                                                   self.translate_support_code)
-        assert itemsize in [1, 2, WORD]
+        assert rffi.sizeof(A.OF) in [1, 2, WORD]
         assert ofs_length == 0
         if isinstance(A.OF, lltype.Ptr) and A.OF.TO._gckind == 'gc':
             ptr = True
@@ -629,7 +629,7 @@
     def fielddescrof(self, S, fieldname):
         ofs, size = symbolic.get_field_token(S, fieldname,
                                              self.translate_support_code)
-        assert isinstance(size, Symbolic) or size in [0, 1, WORD]
+        assert rffi.sizeof(lltype.typeOf(getattr(S, fieldname))) in [1, 2, WORD]
         if (isinstance(getattr(S, fieldname), lltype.Ptr) and
             getattr(S, fieldname).TO._gckind == 'gc'):
             ptr = True



More information about the Pypy-commit mailing list