[pypy-svn] r59019 - in pypy/dist/pypy/translator/backendopt: . test

arigo at codespeak.net arigo at codespeak.net
Sun Oct 12 14:17:09 CEST 2008


Author: arigo
Date: Sun Oct 12 14:17:09 2008
New Revision: 59019

Modified:
   pypy/dist/pypy/translator/backendopt/mallocv.py
   pypy/dist/pypy/translator/backendopt/test/test_mallocv.py
Log:
This test passes now.


Modified: pypy/dist/pypy/translator/backendopt/mallocv.py
==============================================================================
--- pypy/dist/pypy/translator/backendopt/mallocv.py	(original)
+++ pypy/dist/pypy/translator/backendopt/mallocv.py	Sun Oct 12 14:17:09 2008
@@ -179,7 +179,16 @@
         topframe = self
         while topframe.callerframe is not None:
             topframe = topframe.callerframe
-        return topframe, topframe.sourcegraph.exceptblock
+        targetblock = topframe.sourcegraph.exceptblock
+        self.fixup_except_block(targetblock)
+        return topframe, targetblock
+
+    def fixup_except_block(self, block):
+        # hack: this block's inputargs may be missing concretetypes...
+        e1, v1 = block.inputargs
+        e2, v2 = self.sourcegraph.exceptblock.inputargs
+        e1.concretetype = e2.concretetype
+        v1.concretetype = v2.concretetype
 
 
 def copynodes(nodelist, flagreadonly={}):

Modified: pypy/dist/pypy/translator/backendopt/test/test_mallocv.py
==============================================================================
--- pypy/dist/pypy/translator/backendopt/test/test_mallocv.py	(original)
+++ pypy/dist/pypy/translator/backendopt/test/test_mallocv.py	Sun Oct 12 14:17:09 2008
@@ -258,7 +258,6 @@
                    expected_calls=1)
 
     def test_raises_through_inlining(self):
-        py.test.skip("in-progress")
         class A:
             pass
         def g(a):



More information about the Pypy-commit mailing list