[pypy-svn] r53535 - pypy/branch/jit-hotpath/pypy/jit/codegen/ia32

fijal at codespeak.net fijal at codespeak.net
Mon Apr 7 19:52:48 CEST 2008


Author: fijal
Date: Mon Apr  7 19:52:46 2008
New Revision: 53535

Modified:
   pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/objmodel.py
   pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/rgenop.py
Log:
ultra-paranoid asserts


Modified: pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/objmodel.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/objmodel.py	(original)
+++ pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/objmodel.py	Mon Apr  7 19:52:46 2008
@@ -26,6 +26,7 @@
         #          ...              <--- esp+4
         #          local var        <--- esp
         #
+        assert stackpos >= 0
         self.stackpos = stackpos
 
     def nonimmoperand(self, builder, tmpregister):

Modified: pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/rgenop.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/rgenop.py	(original)
+++ pypy/branch/jit-hotpath/pypy/jit/codegen/ia32/rgenop.py	Mon Apr  7 19:52:46 2008
@@ -464,8 +464,11 @@
             if not isinstance(gv, Var) or gv.stackpos in seen:
                 gv = args_gv[i] = gv.newvar(self)
             # remember the var's position in the stack
+            assert gv.stackpos >= 0
             arg_positions.append(gv.stackpos)
             seen[gv.stackpos] = None
+        for pos in arg_positions:
+            assert pos >= 0
         return Label(self.mc.tell(), arg_positions, self.stackdepth)
 
     def jump_if_false(self, gv_condition, args_gv):



More information about the Pypy-commit mailing list