[pypy-svn] r39800 - in pypy/dist/pypy/translator/llvm: . test
rxe at codespeak.net
rxe at codespeak.net
Sat Mar 3 14:29:23 CET 2007
Author: rxe
Date: Sat Mar 3 14:29:21 2007
New Revision: 39800
Modified:
pypy/dist/pypy/translator/llvm/genllvm.py
pypy/dist/pypy/translator/llvm/opwriter.py
pypy/dist/pypy/translator/llvm/test/runtest.py
Log:
(mwh, rxe) kill/rationalize some flags
Modified: pypy/dist/pypy/translator/llvm/genllvm.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/genllvm.py (original)
+++ pypy/dist/pypy/translator/llvm/genllvm.py Sat Mar 3 14:29:21 2007
@@ -24,7 +24,7 @@
function_count = {}
def __init__(self, translator, standalone,
- debug=False, logging=True, stackless=False):
+ debug=True, logging=True, stackless=False):
# reset counters
LLVMNode.nodename_count = {}
@@ -35,12 +35,10 @@
self.config = translator.config
self.stackless = stackless
- # the debug flag is for creating comments of every operation
- # that may be executed
- self.debug = debug
+ # the debug flag is for creating comments of every operation that may be executed
+ self.debug = debug
- # the logging flag is for logging information statistics in the build
- # process
+ # the logging flag is for logging information statistics in the build process
self.logging = logging
self.source_generated = False
Modified: pypy/dist/pypy/translator/llvm/opwriter.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/opwriter.py (original)
+++ pypy/dist/pypy/translator/llvm/opwriter.py Sat Mar 3 14:29:21 2007
@@ -128,7 +128,10 @@
meth = getattr(self, op.opname, None)
if not meth:
raise Exception, "operation %s not found" % op.opname
- self.codewriter.comment(str(op))
+
+ # XXX bit unclean
+ if self.db.genllvm.debug:
+ self.codewriter.comment(str(op))
meth(opr)
def _generic_pow(self, opr, onestr):
Modified: pypy/dist/pypy/translator/llvm/test/runtest.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/test/runtest.py (original)
+++ pypy/dist/pypy/translator/llvm/test/runtest.py Sat Mar 3 14:29:21 2007
@@ -53,15 +53,9 @@
def genllvm_compile(function,
annotation,
-
- # genllvm options
- gcpolicy=None,
- standalone=False,
- stackless=False,
# debug options
- view=False,
- debug=False,
+ debug=True,
logging=False,
log_source=False,
@@ -95,19 +89,15 @@
constfold=False)
# note: this is without stackless and policy transforms
- if view or conftest.option.view:
+ if conftest.option.view:
translator.view()
- if stackless:
- from pypy.translator.transform import insert_ll_stackcheck
- insert_ll_stackcheck(translator)
-
# create genllvm
+ standalone = False
gen = GenLLVM(translator,
standalone,
debug=debug,
- logging=logging,
- stackless=stackless)
+ logging=logging)
filename = gen.gen_llvm_source(function)
@@ -130,7 +120,7 @@
_cleanup(leave=3)
optimize = kwds.pop('optimize', optimize_tests)
mod, fn = genllvm_compile(function, annotation, optimize=optimize,
- logging=False, isolate=isolate, **kwds)
+ isolate=isolate, **kwds)
if isolate:
ext_modules.append(mod)
return mod, fn
More information about the Pypy-commit
mailing list