[pypy-svn] r24799 - pypy/branch/explicit-exceptions/rpython/memory

mwh at codespeak.net mwh at codespeak.net
Wed Mar 22 14:58:03 CET 2006


Author: mwh
Date: Wed Mar 22 14:58:02 2006
New Revision: 24799

Modified:
   pypy/branch/explicit-exceptions/rpython/memory/gctransform.py
Log:
don't overwrite a cleanup in the gc transformer.
this is a temporary hack...


Modified: pypy/branch/explicit-exceptions/rpython/memory/gctransform.py
==============================================================================
--- pypy/branch/explicit-exceptions/rpython/memory/gctransform.py	(original)
+++ pypy/branch/explicit-exceptions/rpython/memory/gctransform.py	Wed Mar 22 14:58:02 2006
@@ -133,9 +133,11 @@
                         cleanup_on_exception.extend(self.pop_alive(var))
                     cleanup_on_exception = tuple(cleanup_on_exception)
                     livevars2cleanup[tuple(livevars)] = cleanup_on_exception
-                op.cleanup = tuple(cleanup_before_exception), cleanup_on_exception
+                if not hasattr(op, 'cleanup'):
+                    op.cleanup = tuple(cleanup_before_exception), cleanup_on_exception
             else:
-                op.cleanup = None
+                if not hasattr(op, 'cleanup'):
+                    op.cleanup = None
             op = ops[-1]
             if var_needsgc(op.result):
                 if op.opname not in ('direct_call', 'indirect_call') and not var_ispyobj(op.result):



More information about the Pypy-commit mailing list