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

arigo at codespeak.net arigo at codespeak.net
Wed Aug 23 11:44:41 CEST 2006


Author: arigo
Date: Wed Aug 23 11:44:40 2006
New Revision: 31517

Modified:
   pypy/dist/pypy/translator/c/support.py
Log:
(pedronis, arigo)

Add asserts.


Modified: pypy/dist/pypy/translator/c/support.py
==============================================================================
--- pypy/dist/pypy/translator/c/support.py	(original)
+++ pypy/dist/pypy/translator/c/support.py	Wed Aug 23 11:44:40 2006
@@ -175,6 +175,7 @@
             # we are left with only pure disjoint cycles; break them
             while dest2src:
                 dst, (src, typename) = dest2src.popitem()
+                assert srccount[dst] == 1
                 startingpoint = dst
                 tmpdecl = cdecl(typename, 'tmp')
                 code = ['{ %s = %s;' % (tmpdecl, dst)]
@@ -182,6 +183,7 @@
                     code.append('%s = %s;' % (dst, src))
                     dst = src
                     src, typename = dest2src.pop(dst)
+                    assert srccount[dst] == 1
                 code.append('%s = tmp; }' % (dst,))
                 yield ' '.join(code)
 



More information about the Pypy-commit mailing list