[pypy-svn] r64021 - pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86

fijal at codespeak.net fijal at codespeak.net
Mon Apr 13 07:50:19 CEST 2009


Author: fijal
Date: Mon Apr 13 07:50:19 2009
New Revision: 64021

Modified:
   pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/regalloc.py
Log:
ok, managed to reproduce this case, stupid typo of freeing vars too early


Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/regalloc.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/regalloc.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/regalloc.py	Mon Apr 13 07:50:19 2009
@@ -1137,7 +1137,6 @@
                                 reloaded.append((arg, self.loc(arg), res))
             elif isinstance(arg, Const):
                 later_loads.append((arg, self.loc(arg), res))
-        self.eventually_free_vars(op.args)
         if reloaded:
             # XXX performance
             free_reg = None
@@ -1147,8 +1146,6 @@
                     break
             if free_reg is None:
                 # a very rare case
-                # XXX even rarer case - what if reg_bindings is empty???
-                # think and write a test maybe
                 v = self.reg_bindings.keys()[0]
                 free_reg = self.reg_bindings[v]
                 self.Store(v, self.loc(v), self.stack_loc(v))
@@ -1156,6 +1153,7 @@
             for v, from_l, to_l in reloaded:
                 self.Load(v, from_l, free_reg)
                 self.Store(v, free_reg, to_l)
+        self.eventually_free_vars(op.args)
         for v, from_l, to_l in later_loads:
             self.Load(v, from_l, to_l)
         self.PerformDiscard(op, [])



More information about the Pypy-commit mailing list