[pypy-svn] pypy default: don't generate one huuuge long here and mask it at the end, but mask it

cfbolz commits-noreply at bitbucket.org
Mon Apr 4 11:46:23 CEST 2011


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: 
Changeset: r43129:f76f5816b0e1
Date: 2011-04-01 21:31 +0200
http://bitbucket.org/pypy/pypy/changeset/f76f5816b0e1/

Log:	don't generate one huuuge long here and mask it at the end, but mask
	it continuously

diff --git a/pypy/rlib/objectmodel.py b/pypy/rlib/objectmodel.py
--- a/pypy/rlib/objectmodel.py
+++ b/pypy/rlib/objectmodel.py
@@ -255,7 +255,7 @@
     x = ord(s[0]) << 7
     i = 0
     while i < length:
-        x = (1000003*x) ^ ord(s[i])
+        x = intmask((1000003*x) ^ ord(s[i]))
         i += 1
     x ^= length
     return intmask(x)


More information about the Pypy-commit mailing list