[pypy-svn] r21848 - pypy/dist/pypy/translator/backendopt/test

cfbolz at codespeak.net cfbolz at codespeak.net
Mon Jan 9 22:04:36 CET 2006


Author: cfbolz
Date: Mon Jan  9 22:04:35 2006
New Revision: 21848

Modified:
   pypy/dist/pypy/translator/backendopt/test/test_malloc.py
Log:
ouch. bad me. don't use the Translator class anymore (not even in tests)


Modified: pypy/dist/pypy/translator/backendopt/test/test_malloc.py
==============================================================================
--- pypy/dist/pypy/translator/backendopt/test/test_malloc.py	(original)
+++ pypy/dist/pypy/translator/backendopt/test/test_malloc.py	Mon Jan  9 22:04:35 2006
@@ -1,7 +1,8 @@
 import py
 from pypy.translator.backendopt.malloc import remove_simple_mallocs
 from pypy.translator.backendopt.inline import inline_function
-from pypy.translator.translator import TranslationContext, Translator, graphof
+from pypy.translator.backendopt.all import backend_optimizations
+from pypy.translator.translator import TranslationContext, graphof
 from pypy.objspace.flow.model import checkgraph, flatten, Block
 from pypy.rpython.llinterp import LLInterpreter
 
@@ -132,11 +133,11 @@
             os.write(1, str(delcalls[0]) + "\n")
             i += 1
         return 1
-    t = Translator(f)
+    t = TranslationContext()
     t.buildannotator().build_types(f, [int])
     t.buildrtyper().specialize()
     graph = graphof(t, f)
-    t.backend_optimizations()
+    backend_optimizations(t)
     op = graph.startblock.exits[0].target.exits[1].target.operations[0]
     assert op.opname == "malloc"
 



More information about the Pypy-commit mailing list