[pypy-commit] pypy jit-counter: Translation fix

arigo noreply at buildbot.pypy.org
Thu Oct 31 12:58:28 CET 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: jit-counter
Changeset: r67772:5a1e8921b8f3
Date: 2013-10-31 12:51 +0100
http://bitbucket.org/pypy/pypy/changeset/5a1e8921b8f3/

Log:	Translation fix

diff --git a/rpython/jit/metainterp/counter.py b/rpython/jit/metainterp/counter.py
--- a/rpython/jit/metainterp/counter.py
+++ b/rpython/jit/metainterp/counter.py
@@ -1,4 +1,4 @@
-from rpython.rlib.rarithmetic import r_singlefloat, intmask
+from rpython.rlib.rarithmetic import r_singlefloat, intmask, r_uint
 from rpython.rtyper.lltypesystem import lltype, rffi
 from rpython.translator.tool.cbuild import ExternalCompilationInfo
 
@@ -33,7 +33,7 @@
     def get_index(self, hash):
         """Return the index (< self.size) from a hash value.  This keeps
         the *high* bits of hash!  Be sure that hash is computed correctly."""
-        return intmask(r_uint32(hash) >> self.shift)
+        return intmask(r_uint32(r_uint(hash) >> self.shift))
     get_index._always_inline_ = True
 
     def fetch_next_index(self):


More information about the pypy-commit mailing list