[pypy-svn] r69765 - in pypy/branch/virtual-forcing/pypy/jit: backend/llgraph metainterp/test
arigo at codespeak.net
arigo at codespeak.net
Mon Nov 30 14:40:55 CET 2009
Author: arigo
Date: Mon Nov 30 14:40:54 2009
New Revision: 69765
Modified:
pypy/branch/virtual-forcing/pypy/jit/backend/llgraph/runner.py
pypy/branch/virtual-forcing/pypy/jit/metainterp/test/test_del.py
Log:
Someone forgot that the llgraph.Descr has custom __eq__ and __hash__
functions... Argh, took a while.
Modified: pypy/branch/virtual-forcing/pypy/jit/backend/llgraph/runner.py
==============================================================================
--- pypy/branch/virtual-forcing/pypy/jit/backend/llgraph/runner.py (original)
+++ pypy/branch/virtual-forcing/pypy/jit/backend/llgraph/runner.py Mon Nov 30 14:40:54 2009
@@ -34,17 +34,19 @@
return self.extrainfo
def __hash__(self):
- return hash((self.ofs, self.typeinfo))
+ return hash((self.ofs, self.typeinfo, self.extrainfo))
def __eq__(self, other):
if not isinstance(other, Descr):
return NotImplemented
- return self.ofs == other.ofs and self.typeinfo == other.typeinfo
+ return (self.ofs == other.ofs and self.typeinfo == other.typeinfo
+ and self.extrainfo == other.extrainfo)
def __ne__(self, other):
if not isinstance(other, Descr):
return NotImplemented
- return self.ofs != other.ofs or self.typeinfo != other.typeinfo
+ return (self.ofs != other.ofs or self.typeinfo != other.typeinfo
+ or self.extrainfo != other.extrainfo)
def sort_key(self):
return self.ofs
Modified: pypy/branch/virtual-forcing/pypy/jit/metainterp/test/test_del.py
==============================================================================
--- pypy/branch/virtual-forcing/pypy/jit/metainterp/test/test_del.py (original)
+++ pypy/branch/virtual-forcing/pypy/jit/metainterp/test/test_del.py Mon Nov 30 14:40:54 2009
@@ -78,9 +78,7 @@
return 1
res = self.meta_interp(f, [20], optimizer=OPTIMIZER_SIMPLE)
assert res == 1
- self.check_loops(call_may_force=1)
- # for the case B(), but not for the case A()
- # XXX it should really be 'call', not 'call_may_force'.
+ self.check_loops(call=1) # for the case B(), but not for the case A()
class TestLLtype(DelTests, LLJitMixin):
More information about the Pypy-commit
mailing list