From 3b0a3e59ffb76773591564c99a68c0cabc5904e6 Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Tue, 19 May 2009 21:49:21 +0200 Subject: [PATCH] debug_verbose_pipeline flag added --- Cython/Compiler/DebugFlags.py | 3 +++ Cython/Compiler/Main.py | 3 +++ 2 files changed, 6 insertions(+) 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 -- 2.26.2