[pypy-svn] r10246 - pypy/dist/pypy/translator

pedronis at codespeak.net pedronis at codespeak.net
Sat Apr 2 05:35:26 CEST 2005


Author: pedronis
Date: Sat Apr  2 05:35:25 2005
New Revision: 10246

Modified:
   pypy/dist/pypy/translator/genc_funcdef.py
Log:
moved remove_direct_loops so that introduced vars are declared as needed



Modified: pypy/dist/pypy/translator/genc_funcdef.py
==============================================================================
--- pypy/dist/pypy/translator/genc_funcdef.py	(original)
+++ pypy/dist/pypy/translator/genc_funcdef.py	Sat Apr  2 05:35:25 2005
@@ -45,6 +45,8 @@
         self.globalobject_name = None                                # gfunc_xxx
         self.localscope = namespace.localScope()
         self.graph = graph = genc.translator.getflowgraph(func)
+        remove_direct_loops(graph) # this can introduce new vars! we need to declare them
+        checkgraph(graph)
         graph_args = graph.getargs()
 
         # collect all the local variables
@@ -272,8 +274,6 @@
 
     def cfunction_body(self):
         graph = self.graph
-        remove_direct_loops(graph)
-        checkgraph(graph)
 
         blocknum = {}
         allblocks = []



More information about the Pypy-commit mailing list