[pypy-svn] r65062 - in pypy/branch/pyjitpl5/pypy/jit/metainterp: . test
antocuni at codespeak.net
antocuni at codespeak.net
Tue May 5 16:54:59 CEST 2009
Author: antocuni
Date: Tue May 5 16:54:58 2009
New Revision: 65062
Modified:
pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py
pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_basic.py
Log:
opimpl_oois
Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/pyjitpl.py Tue May 5 16:54:58 2009
@@ -431,6 +431,7 @@
def opimpl_ptr_ne(self, box1, box2):
self.execute(rop.OOISNOT, [box1, box2])
+ opimpl_oois = opimpl_ptr_eq
@arguments("box", "descr")
def opimpl_getfield_gc(self, box, fielddesc):
Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_basic.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_basic.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/test/test_basic.py Tue May 5 16:54:58 2009
@@ -569,6 +569,20 @@
# translation?
assert res == ootype.oohash(ootype.oostring(5, -1))
+ def test_oois(self):
+ A = ootype.Instance("A", ootype.ROOT)
+ def f(n):
+ obj1 = ootype.new(A)
+ if n:
+ obj2 = obj1
+ else:
+ obj2 = ootype.new(A)
+ return obj1 is obj2
+ res = self.interp_operations(f, [0])
+ assert not res
+ res = self.interp_operations(f, [1])
+ assert res
+
class TestLLtype(BasicTests, LLJitMixin):
More information about the Pypy-commit
mailing list