[pypy-svn] r15772 - pypy/dist/pypy/rpython/memory

cfbolz at codespeak.net cfbolz at codespeak.net
Mon Aug 8 16:48:07 CEST 2005


Author: cfbolz
Date: Mon Aug  8 16:48:06 2005
New Revision: 15772

Modified:
   pypy/dist/pypy/rpython/memory/convertlltype.py
Log:
check whether a link has an llexitcase before touching it.


Modified: pypy/dist/pypy/rpython/memory/convertlltype.py
==============================================================================
--- pypy/dist/pypy/rpython/memory/convertlltype.py	(original)
+++ pypy/dist/pypy/rpython/memory/convertlltype.py	Mon Aug  8 16:48:06 2005
@@ -118,7 +118,8 @@
         def visit(obj):
             if isinstance(obj, Link):
                 collect_args(obj.args)
-                constants[Constant(obj.llexitcase)] = None
+                if hasattr(obj, "llexitcase"):
+                    constants[Constant(obj.llexitcase)] = None
             elif isinstance(obj, Block):
                 for op in obj.operations:
                     collect_args(op.args)
@@ -189,7 +190,8 @@
         def visit(obj):
             if isinstance(obj, Link):
                 patch_consts(obj.args)
-                if Constant(obj.llexitcase) in self.constants:
+                if (hasattr(obj, "llexitcase") and
+                    Constant(obj.llexitcase) in self.constants):
                     obj.llexitcase = self.constants[Constant(obj.llexitcase)]
             elif isinstance(obj, Block):
                 for op in obj.operations:



More information about the Pypy-commit mailing list