[pypy-svn] r67064 - in pypy/branch/pyjitpl5/pypy/jit/backend/x86: . test

fijal at codespeak.net fijal at codespeak.net
Fri Aug 21 14:45:26 CEST 2009


Author: fijal
Date: Fri Aug 21 14:45:24 2009
New Revision: 67064

Modified:
   pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py
   pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_regalloc.py
Log:
Fix the bug that debug_merge_point does not free its arg (but but but
in case of a moving gc its a box and not a const)


Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/regalloc.py	Fri Aug 21 14:45:24 2009
@@ -226,6 +226,8 @@
         single_gcref_descr = self.assembler.single_gcref_descr
         newops = []
         for op in operations:
+            if op.opnum == rop.DEBUG_MERGE_POINT:
+                continue
             for i in range(len(op.args)):
                 v = op.args[i]
                 if (isinstance(v, ConstPtr) and v.value

Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_regalloc.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_regalloc.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/test/test_regalloc.py	Fri Aug 21 14:45:24 2009
@@ -409,6 +409,15 @@
         self.interpret(ops, [0])
         assert not self.getptr(0, lltype.Ptr(self.S))
 
+    def test_get_rid_of_debug_merge_point(self):
+        ops = '''
+        []
+        debug_merge_point()
+        fail()
+        '''
+        loop = self.interpret(ops, [], run=False)
+        assert len(loop.operations) == 1
+
     def test_bug_0(self):
         ops = '''
         [i0, i1, i2, i3, i4, i5, i6, i7, i8]



More information about the Pypy-commit mailing list