[pypy-svn] r54778 - pypy/branch/oo-jit/pypy/jit/codegen/cli

antocuni at codespeak.net antocuni at codespeak.net
Fri May 16 10:11:45 CEST 2008


Author: antocuni
Date: Fri May 16 10:11:44 2008
New Revision: 54778

Modified:
   pypy/branch/oo-jit/pypy/jit/codegen/cli/rgenop.py
Log:
return the identityhash intead of dummy numbers when converting from object to integers



Modified: pypy/branch/oo-jit/pypy/jit/codegen/cli/rgenop.py
==============================================================================
--- pypy/branch/oo-jit/pypy/jit/codegen/cli/rgenop.py	(original)
+++ pypy/branch/oo-jit/pypy/jit/codegen/cli/rgenop.py	Fri May 16 10:11:44 2008
@@ -1,4 +1,5 @@
 from pypy.tool.pairtype import extendabletype
+from pypy.rlib.rarithmetic import intmask
 from pypy.rpython.ootypesystem import ootype
 from pypy.rlib.objectmodel import specialize
 from pypy.jit.codegen.model import AbstractRGenOp, GenBuilder, GenLabel
@@ -172,9 +173,9 @@
     @specialize.arg(1)
     def revealconst(self, T):
         if T is ootype.Signed:
-            return 12345
+            return ootype.ooidentityhash(self.obj)
         elif T is ootype.Unsigned:
-            return 12346
+            return intmask(ootype.ooidentityhash(self.obj))
         return ootype.cast_from_object(T, self.obj)
 
 



More information about the Pypy-commit mailing list