[pypy-svn] r55120 - pypy/branch/smalltalk-shadow-changes/pypy/translator/backendopt/test

cfbolz at codespeak.net cfbolz at codespeak.net
Thu May 22 09:20:43 CEST 2008


Author: cfbolz
Date: Thu May 22 09:20:42 2008
New Revision: 55120

Modified:
   pypy/branch/smalltalk-shadow-changes/pypy/translator/backendopt/test/test_malloc.py
Log:
failing test about malloc removal in the presence of cast_pointers. The
problem is that malloc removal replaces each occurence of the same
structure in the input args of a block by the exploded vars, which means
that there is no global view of what the variables currently are.


Modified: pypy/branch/smalltalk-shadow-changes/pypy/translator/backendopt/test/test_malloc.py
==============================================================================
--- pypy/branch/smalltalk-shadow-changes/pypy/translator/backendopt/test/test_malloc.py	(original)
+++ pypy/branch/smalltalk-shadow-changes/pypy/translator/backendopt/test/test_malloc.py	Thu May 22 09:20:42 2008
@@ -334,6 +334,18 @@
         [link] = entrymap[graph.returnblock]
         assert link.prevblock.operations[-1].opname == 'keepalive'
 
+    def test_nested_struct(self):
+        py.test.skip("XXX fix me!")
+        S = lltype.GcStruct("S", ('x', lltype.Signed))
+        T = lltype.GcStruct("T", ('s', S))
+        def f(x):
+            t = lltype.malloc(T)
+            s = t.s
+            if x:
+                s.x = x
+            return t.s.x + s.x
+        graph = self.check(f, [int], [42], 2 * 42)
+
     def test_interior_ptr(self):
         py.test.skip("fails")
         S = lltype.Struct("S", ('x', lltype.Signed))



More information about the Pypy-commit mailing list