[pypy-svn] r68528 - pypy/branch/gc-hash/pypy/lang/prolog/interpreter
arigo at codespeak.net
arigo at codespeak.net
Fri Oct 16 12:06:14 CEST 2009
Author: arigo
Date: Fri Oct 16 12:06:13 2009
New Revision: 68528
Modified:
pypy/branch/gc-hash/pypy/lang/prolog/interpreter/term.py
Log:
hash -> compute_hash or compute_identity_hash.
Modified: pypy/branch/gc-hash/pypy/lang/prolog/interpreter/term.py
==============================================================================
--- pypy/branch/gc-hash/pypy/lang/prolog/interpreter/term.py (original)
+++ pypy/branch/gc-hash/pypy/lang/prolog/interpreter/term.py Fri Oct 16 12:06:13 2009
@@ -5,6 +5,7 @@
from pypy.lang.prolog.interpreter.error import UnificationFailed, UncatchableError
from pypy.lang.prolog.interpreter import error
from pypy.rlib.objectmodel import specialize
+from pypy.rlib.objectmodel import compute_hash, compute_identity_hash
DEBUG = False
@@ -244,7 +245,7 @@
raise UnificationFailed
def get_unify_hash(self, heap):
- return intmask(hash(self.name) << TAGBITS | self.TAG)
+ return intmask(compute_hash(self.name) << TAGBITS | self.TAG)
def unify_hash_of_children(self, heap):
return []
@@ -370,7 +371,7 @@
raise UnificationFailed
def get_unify_hash(self, heap):
- return intmask(hash(self) << TAGBITS | self.TAG)
+ return intmask(compute_identity_hash(self) << TAGBITS | self.TAG)
@@ -450,7 +451,7 @@
return self
def get_unify_hash(self, heap):
- return intmask(hash(self.signature) << TAGBITS | self.TAG)
+ return intmask(compute_hash(self.signature) << TAGBITS | self.TAG)
def unify_hash_of_children(self, heap):
unify_hash = []
More information about the Pypy-commit
mailing list