[pypy-svn] r17347 - pypy/dist/pypy/interpreter/astcompiler

ac at codespeak.net ac at codespeak.net
Thu Sep 8 10:51:32 CEST 2005


Author: ac
Date: Thu Sep  8 10:51:32 2005
New Revision: 17347

Modified:
   pypy/dist/pypy/interpreter/astcompiler/pyassem.py
   pypy/dist/pypy/interpreter/astcompiler/symbols.py
Log:
Loose some SomeObjects().

Modified: pypy/dist/pypy/interpreter/astcompiler/pyassem.py
==============================================================================
--- pypy/dist/pypy/interpreter/astcompiler/pyassem.py	(original)
+++ pypy/dist/pypy/interpreter/astcompiler/pyassem.py	Thu Sep  8 10:51:32 2005
@@ -964,8 +964,8 @@
             opname = i.op
             if debug:
                 print i,
-            delta = self.effect.get(opname, None)
-            if delta is not None:
+            delta = self.effect.get(opname, sys.maxint)
+            if delta != sys.maxint:
                 depth = depth + delta
             else:
                 # now check patterns
@@ -975,7 +975,7 @@
                         depth = depth + delta
                         break
                 # if we still haven't found a match
-                if delta is None:
+                if delta == sys.maxint:
                     meth = DEPTH_OP_TRACKER.get( opname, None )
                     if meth is not None:
                         assert isinstance(i, InstrInt)

Modified: pypy/dist/pypy/interpreter/astcompiler/symbols.py
==============================================================================
--- pypy/dist/pypy/interpreter/astcompiler/symbols.py	(original)
+++ pypy/dist/pypy/interpreter/astcompiler/symbols.py	Thu Sep  8 10:51:32 2005
@@ -106,7 +106,7 @@
 
     def get_free_vars(self):
         if not self.nested:
-            return ()
+            return []
         free = {}
         free.update(self.frees)
         for name in self.uses.keys():



More information about the Pypy-commit mailing list