Commits

Armin Rigo committed e2a9e7d

Fix the test by a hack. Also as discussed on IRC the test is really
about frozen objects; so far it does not work as is on non-frozen objects.

Comments (0)

Files changed (2)

pypy/jit/metainterp/test/test_ajit.py

         self.meta_interp(f, [10], repeat=3)
 
     def test_jit_merge_point_with_pbc(self):
-        py.test.skip("failing")
         driver = JitDriver(greens = [], reds = ['x'])
 
         class A(object):
             def __init__(self, x):
                 self.x = x
+            def _freeze_(self):
+                return True
         pbc = A(1)
 
         def main(x):

pypy/translator/unsimplify.py

     if _forcelink is not None:
         assert index == 0
         linkargs = list(_forcelink)
+        for v in varmap:
+            if v not in linkargs:
+                # 'v' was not specified by _forcelink, but we found out that
+                # we need it!  Hack: if it is 'concretetype is lltype.Void'
+                # then it's ok to recreate its value in the target block.
+                # If not, then we have a problem :-)
+                from pypy.rpython.lltypesystem import lltype
+                assert v.concretetype is lltype.Void
+                c = Constant(None, lltype.Void)
+                w = varmap[v]
+                newop = SpaceOperation('same_as', [c], w)
+                i = 0
+                while i < len(moved_operations):
+                    if w in moved_operations[i].args:
+                        break
+                    i += 1
+                moved_operations.insert(i, newop)
     else:
         linkargs = varmap.keys()
     newblock = Block([get_new_name(v) for v in linkargs])