From 575a450954ca42b4ab7903ce56c71e7e6b26bc35 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 15 Mar 2009 09:02:40 +0100 Subject: [PATCH] make code generation tracing an official debug feature, disable all debug features by default --- Cython/Compiler/DebugFlags.py | 6 +++++- Cython/Compiler/Nodes.py | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cython/Compiler/DebugFlags.py b/Cython/Compiler/DebugFlags.py index b5c27369..d43f5d1a 100644 --- a/Cython/Compiler/DebugFlags.py +++ b/Cython/Compiler/DebugFlags.py @@ -2,5 +2,9 @@ debug_disposal_code = 0 debug_temp_alloc = 0 debug_coercion = 0 -debug_temp_code_comments = 1 +# Write comments into the C code that show where temporary variables +# are allocated and released +debug_temp_code_comments = 0 +# Write a call trace of the code generation phase into the C code +debug_trace_code_generation = 0 diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 64572fb4..0cd1e18a 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -116,8 +116,8 @@ class Node(object): # is_name boolean Is a NameNode # is_literal boolean Is a ConstNode - # Uncomment this for debugging. - # __metaclass__ = VerboseCodeWriter + if DebugFlags.debug_trace_code_generation: + __metaclass__ = VerboseCodeWriter is_name = 0 is_literal = 0 -- 2.26.2