[pypy-svn] r22750 - pypy/dist/pypy/translator/c

mwh at codespeak.net mwh at codespeak.net
Fri Jan 27 18:34:00 CET 2006


Author: mwh
Date: Fri Jan 27 18:33:59 2006
New Revision: 22750

Modified:
   pypy/dist/pypy/translator/c/newfuncgen.py
Log:
dispatch to the gc policy for "gc_" operations


Modified: pypy/dist/pypy/translator/c/newfuncgen.py
==============================================================================
--- pypy/dist/pypy/translator/c/newfuncgen.py	(original)
+++ pypy/dist/pypy/translator/c/newfuncgen.py	Fri Jan 27 18:33:59 2006
@@ -226,7 +226,10 @@
             for op in block.operations:
                 err   = 'err%d_%d' % (myblocknum, len(to_release))
                 macro = 'OP_%s' % op.opname.upper()
-                meth  = getattr(self, macro, None)
+                if op.opname.startswith('gc_'):
+                    meth = getattr(self.gcpolicy, macro, None)
+                else:
+                    meth = getattr(self, macro, None)
                 if meth:
                     line = meth(op, err)
                 else:



More information about the Pypy-commit mailing list