[pypy-svn] r33524 - in pypy/branch/even-more-config3/pypy: config translator/js translator/llvm

fijal at codespeak.net fijal at codespeak.net
Sat Oct 21 13:30:23 CEST 2006


Author: fijal
Date: Sat Oct 21 13:30:22 2006
New Revision: 33524

Modified:
   pypy/branch/even-more-config3/pypy/config/pypyoption.py
   pypy/branch/even-more-config3/pypy/translator/js/main.py
   pypy/branch/even-more-config3/pypy/translator/llvm/genllvm.py
Log:
Seems that llvm/js tests are passing

Modified: pypy/branch/even-more-config3/pypy/config/pypyoption.py
==============================================================================
--- pypy/branch/even-more-config3/pypy/config/pypyoption.py	(original)
+++ pypy/branch/even-more-config3/pypy/config/pypyoption.py	Sat Oct 21 13:30:22 2006
@@ -146,7 +146,7 @@
         StrOption("profopt", "Specify profile based optimization script",
                   cmdline="--profopt"),
         BoolOption("debug_transform", "Perform the debug transformation",
-                   default=False, cmdline=None, negation=False),
+                   default=False, cmdline="--debug-transform", negation=False),
 
         # Flags of the TranslationContext:
         BoolOption("simplifying", "Simplify flow graphs", default=True),
@@ -187,10 +187,6 @@
             BoolOption("trace_calls", "Trace function calls", default=False,
                        cmdline="--cli-trace-calls")
         ]),
-        OptionDescription("js", "JavaScript options", [
-            BoolOption("debug_transform", "Debug transform graph", default=False,
-                       cmdline="--debug-transform")
-        ])
     ]),
 ])
 

Modified: pypy/branch/even-more-config3/pypy/translator/js/main.py
==============================================================================
--- pypy/branch/even-more-config3/pypy/translator/js/main.py	(original)
+++ pypy/branch/even-more-config3/pypy/translator/js/main.py	Sat Oct 21 13:30:22 2006
@@ -126,7 +126,7 @@
     from pypy.config.config import Config
     from pypy.config.pypyoption import pypy_optiondescription
     config = Config(pypy_optiondescription)
-    config.translation.js.debug_transform = opts.debug_transform
+    config.translation.debug_transform = opts.debug_transform
     driver = TranslationDriver(config=config)
     try:
         driver.setup(some_strange_function_which_will_never_be_called, [], policy = JsPolicy())

Modified: pypy/branch/even-more-config3/pypy/translator/llvm/genllvm.py
==============================================================================
--- pypy/branch/even-more-config3/pypy/translator/llvm/genllvm.py	(original)
+++ pypy/branch/even-more-config3/pypy/translator/llvm/genllvm.py	Sat Oct 21 13:30:22 2006
@@ -25,7 +25,7 @@
     function_count = {}
 
     def __init__(self, translator, gcpolicy, standalone,
-                 debug=False, logging=True, stackless=False):
+                 debug=False, logging=True, stackless=False, config=None):
     
         # reset counters
         LLVMNode.nodename_count = {}    
@@ -39,9 +39,11 @@
         self.standalone = standalone
         self.translator = translator
         
-        from pypy.config.config import Config
-        from pypy.config.pypyoption import pypy_optiondescription
-        self.config = Config(pypy_optiondescription)
+        if config is None:
+            from pypy.config.config import Config
+            from pypy.config.pypyoption import pypy_optiondescription
+            config = Config(pypy_optiondescription)
+        self.config = config
         self.stackless = stackless
 
         # the debug flag is for creating comments of every operation
@@ -81,7 +83,7 @@
         # please dont ask!
         from pypy.translator.c.genc import CStandaloneBuilder
         from pypy.translator.c import gc
-        cbuild = CStandaloneBuilder(self.translator, func) # XXX gc policy here?
+        cbuild = CStandaloneBuilder(self.translator, func, config=self.config)
         cbuild.stackless = self.stackless
         c_db = cbuild.generate_graphs_for_llinterp()
 



More information about the Pypy-commit mailing list