[pypy-svn] r21869 - pypy/dist/pypy/translator/js/test

ericvrp at codespeak.net ericvrp at codespeak.net
Tue Jan 10 12:25:56 CET 2006


Author: ericvrp
Date: Tue Jan 10 12:25:55 2006
New Revision: 21869

Modified:
   pypy/dist/pypy/translator/js/test/runtest.py
   pypy/dist/pypy/translator/js/test/test_genllvm1.py
   pypy/dist/pypy/translator/js/test/test_merge_if_blocks.py
   pypy/dist/pypy/translator/js/test/test_seq.py
Log:
genjs: Translator -> TranslationContext


Modified: pypy/dist/pypy/translator/js/test/runtest.py
==============================================================================
--- pypy/dist/pypy/translator/js/test/runtest.py	(original)
+++ pypy/dist/pypy/translator/js/test/runtest.py	Tue Jan 10 12:25:55 2006
@@ -1,5 +1,6 @@
 import py, os
-from pypy.translator.translator import Translator
+from pypy.translator.translator import TranslationContext
+from pypy.translator.backendopt.all import backend_optimizations                                 
 from pypy.translator.js.js import JS
 from pypy.translator.js.test.browsertest import jstest
 from pypy.translator.js import conftest
@@ -21,11 +22,11 @@
         if not use_browsertest and not _CLI_is_on_path():
             py.test.skip('Javascript CLI (js) not found')
 
-        t = Translator(function)
-        a = t.annotate(annotation)
-        t.specialize()
-        t.backend_optimizations(inline_threshold=0, mallocs=False)
-        #t.backend_optimizations()
+        t = TranslationContext()
+        t.buildannotator().build_types(function, annotation)
+        t.buildrtyper().specialize() 
+        backend_optimizations(t, inline_threshold=0, mallocs=False)
+        #backend_optimizations(t)
         if view:
             t.view()
         self.js = JS(t, function, stackless)

Modified: pypy/dist/pypy/translator/js/test/test_genllvm1.py
==============================================================================
--- pypy/dist/pypy/translator/js/test/test_genllvm1.py	(original)
+++ pypy/dist/pypy/translator/js/test/test_genllvm1.py	Tue Jan 10 12:25:55 2006
@@ -3,7 +3,6 @@
 
 import py
 
-from pypy.translator.translator import Translator
 from pypy.objspace.flow.model import Constant, Variable
 from pypy.translator.js.test.runtest import compile_function
 from pypy.translator.llvm.test import llvmsnippet

Modified: pypy/dist/pypy/translator/js/test/test_merge_if_blocks.py
==============================================================================
--- pypy/dist/pypy/translator/js/test/test_merge_if_blocks.py	(original)
+++ pypy/dist/pypy/translator/js/test/test_merge_if_blocks.py	Tue Jan 10 12:25:55 2006
@@ -15,7 +15,7 @@
         assert simple(i) == merge_if_blocks_simple(i)
 
 def test_merge_if_blocks_basic():
-    py.skip("merge_if_block failing because link exit values are not used")
+    py.test.skip("merge_if_block failing because link exit values are not used")
     def merge_if_blocks_basic(i):
         if i == 5:
             return 1005
@@ -27,7 +27,7 @@
         assert basic(i) == merge_if_blocks_basic(i)
 
 def test_merge_if_blocks_chr():
-    py.skip("merge_if_block failing because link exit values are not used")
+    py.test.skip("merge_if_block failing because link exit values are not used")
     def merge_if_blocks_chr(i):
         c = chr(i)
         if c == '\x05':
@@ -40,7 +40,7 @@
         assert basic(i) == merge_if_blocks_chr(i)
 
 def test_merge_if_blocks_uni():
-    py.skip("merge_if_block failing because link exit values are not used")
+    py.test.skip("merge_if_block failing because link exit values are not used")
     def merge_if_blocks_uni(i):
         c = unichr(i)
         if c == u'\x05':
@@ -54,7 +54,7 @@
 
 
 def test_merge_if_blocks_many():
-    py.skip("merge_if_block failing because link exit values are not used")
+    py.test.skip("merge_if_block failing because link exit values are not used")
     def merge_if_blocks_many(i):
         if i == 0:
             return 1000 

Modified: pypy/dist/pypy/translator/js/test/test_seq.py
==============================================================================
--- pypy/dist/pypy/translator/js/test/test_seq.py	(original)
+++ pypy/dist/pypy/translator/js/test/test_seq.py	Tue Jan 10 12:25:55 2006
@@ -1,7 +1,6 @@
 from __future__ import division
 import py
 
-from pypy.translator.translator import Translator
 from pypy.objspace.flow.model import Constant, Variable
 from pypy.translator.js.test.runtest import compile_function
 from pypy.translator.llvm.test import llvmsnippet



More information about the Pypy-commit mailing list