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

arigo at codespeak.net arigo at codespeak.net
Fri May 15 11:45:17 CEST 2009


Author: arigo
Date: Fri May 15 11:45:17 2009
New Revision: 65267

Modified:
   pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py
Log:
NULL pointers can't move.


Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py	Fri May 15 11:45:17 2009
@@ -335,7 +335,8 @@
         for op in operations:
             for i in range(len(op.args)):
                 v = op.args[i]
-                if isinstance(v, ConstPtr) and rgc.can_move(v.value):
+                if (isinstance(v, ConstPtr) and v.value
+                                            and rgc.can_move(v.value)):
                     box = BoxPtr(v.value)
                     addr = gcrefs.get_address_of_gcref(v.value)
                     addr = rffi.cast(lltype.Signed, addr)



More information about the Pypy-commit mailing list