[pypy-commit] pypy default: temporarily backout 39a9093e603d: it seems to trigger an asmgcc bug

antocuni noreply at buildbot.pypy.org
Tue Jul 26 10:01:10 CEST 2011


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: 
Changeset: r45997:9d796d6049d6
Date: 2011-07-26 09:59 +0200
http://bitbucket.org/pypy/pypy/changeset/9d796d6049d6/

Log:	temporarily backout 39a9093e603d: it seems to trigger an asmgcc bug

diff --git a/pypy/rpython/memory/gc/minimark.py b/pypy/rpython/memory/gc/minimark.py
--- a/pypy/rpython/memory/gc/minimark.py
+++ b/pypy/rpython/memory/gc/minimark.py
@@ -49,7 +49,6 @@
 from pypy.rpython.lltypesystem.llmemory import raw_malloc_usage
 from pypy.rpython.memory.gc.base import GCBase, MovingGCBase
 from pypy.rpython.memory.gc import minimarkpage, env
-from pypy.rpython.memory.support import mangle_hash
 from pypy.rlib.rarithmetic import ovfcheck, LONG_BIT, intmask, r_uint
 from pypy.rlib.rarithmetic import LONG_BIT_SHIFT
 from pypy.rlib.debug import ll_assert, debug_print, debug_start, debug_stop
@@ -1794,7 +1793,7 @@
         return self.id_or_identityhash(gcobj, False)
 
     def identityhash(self, gcobj):
-        return mangle_hash(self.id_or_identityhash(gcobj, True))
+        return self.id_or_identityhash(gcobj, True)
 
 
     # ----------
diff --git a/pypy/rpython/memory/lldict.py b/pypy/rpython/memory/lldict.py
--- a/pypy/rpython/memory/lldict.py
+++ b/pypy/rpython/memory/lldict.py
@@ -1,7 +1,6 @@
 from pypy.rpython.lltypesystem import lltype, llmemory
 from pypy.rpython.lltypesystem import rdict
 from pypy.rlib.objectmodel import we_are_translated
-from pypy.rpython.memory.support import mangle_hash
 
 # This is a low-level AddressDict, reusing a lot of the logic from rdict.py.
 # xxx this is very dependent on the details of rdict.py
@@ -41,8 +40,7 @@
     lltype.free(entries, flavor="raw")
     if not we_are_translated(): count_alloc(-1)
 
-def _hash(adr):
-    return mangle_hash(llmemory.cast_adr_to_int(adr))
+_hash = llmemory.cast_adr_to_int
 
 def dict_keyhash(d, key):
     return _hash(key)
diff --git a/pypy/rpython/memory/support.py b/pypy/rpython/memory/support.py
--- a/pypy/rpython/memory/support.py
+++ b/pypy/rpython/memory/support.py
@@ -4,15 +4,6 @@
 from pypy.rlib.debug import ll_assert
 from pypy.tool.identity_dict import identity_dict
 
-
-def mangle_hash(i):
-    # To hash pointers in dictionaries.  Assumes that i shows some
-    # alignment (to 4, 8, maybe 16 bytes), so we use the following
-    # formula to avoid the trailing bits being always 0.
-    return i ^ (i >> 4)
-
-# ____________________________________________________________
-
 DEFAULT_CHUNK_SIZE = 1019
 
 


More information about the pypy-commit mailing list