From: Dag Sverre Seljebotn Date: Tue, 19 May 2009 19:49:21 +0000 (+0200) Subject: debug_verbose_pipeline flag added X-Git-Tag: 0.12.alpha0~293 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3b0a3e59ffb76773591564c99a68c0cabc5904e6;p=cython.git debug_verbose_pipeline flag added --- diff --git a/Cython/Compiler/DebugFlags.py b/Cython/Compiler/DebugFlags.py index 0e80338e..d6d52189 100644 --- a/Cython/Compiler/DebugFlags.py +++ b/Cython/Compiler/DebugFlags.py @@ -11,3 +11,6 @@ debug_trace_code_generation = 0 # Do not replace exceptions with user-friendly error messages debug_no_exception_intercept = 0 + +# Print a message each time a new stage in the pipeline is entered +debug_verbose_pipeline = 0 diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index cc7999e2..6cf17f47 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -24,6 +24,7 @@ from Symtab import BuiltinScope, ModuleScope from Cython import Utils from Cython.Utils import open_new_file, replace_suffix import CythonScope +import DebugFlags module_name_pattern = re.compile(r"[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$") @@ -196,6 +197,8 @@ class Context(object): try: for phase in pipeline: if phase is not None: + if DebugFlags.debug_verbose_pipeline: + print "Entering pipeline phase %r" % phase data = phase(data) except CompileError, err: # err is set