Author: Maciej Fijalkowski <[email protected]>
Branch: optresult-unroll
Changeset: r79221:6d35fabfd54c
Date: 2015-08-25 11:04 +0200
http://bitbucket.org/pypy/pypy/changeset/6d35fabfd54c/

Log:    fix tests

diff --git a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py 
b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
--- a/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
+++ b/rpython/jit/metainterp/optimizeopt/test/test_optimizeopt.py
@@ -6146,7 +6146,7 @@
     def test_immutable_constantfold_recursive(self):
         ops = """
         []
-        p0 = new_with_vtable(ConstClass(ptrobj_immut_vtable))
+        p0 = new_with_vtable(descr=ptrobj_immut_descr)
         setfield_gc(p0, p0, descr=immut_ptrval)
         escape_n(p0)
         jump()
@@ -6160,6 +6160,8 @@
                 p1 = other.container.ptrval
                 p1cast = lltype.cast_pointer(lltype.Ptr(self.PTROBJ_IMMUT), p1)
                 return p1cast.ptrval == p1
+            def _normalizedcontainer(self):
+                return self
         self.namespace['ptrobjself'] = lltype._ptr(llmemory.GCREF,
                                                    PtrObjSelf())
         expected = """
@@ -6171,8 +6173,8 @@
         #
         ops = """
         []
-        p0 = new_with_vtable(ConstClass(ptrobj_immut_vtable))
-        p1 = new_with_vtable(ConstClass(ptrobj_immut_vtable))
+        p0 = new_with_vtable(descr=ptrobj_immut_descr)
+        p1 = new_with_vtable(descr=ptrobj_immut_descr)
         setfield_gc(p0, p1, descr=immut_ptrval)
         setfield_gc(p1, p0, descr=immut_ptrval)
         escape_n(p0)
diff --git a/rpython/jit/metainterp/optimizeopt/test/test_util.py 
b/rpython/jit/metainterp/optimizeopt/test/test_util.py
--- a/rpython/jit/metainterp/optimizeopt/test/test_util.py
+++ b/rpython/jit/metainterp/optimizeopt/test/test_util.py
@@ -169,6 +169,7 @@
                                             ('ptrval', lltype.Ptr(OBJECT)),
                                             hints={'immutable': True})
     ptrobj_immut_vtable = lltype.malloc(OBJECT_VTABLE, immortal=True)
+    ptrobj_immut_descr = cpu.sizeof(PTROBJ_IMMUT, ptrobj_immut_vtable)
     immut_ptrval = cpu.fielddescrof(PTROBJ_IMMUT, 'ptrval')
 
     arraydescr = cpu.arraydescrof(lltype.GcArray(lltype.Signed))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to