On Mon May 19 15:29:33 2008, cognominal wrote: > Request for enhancement: > > At the PIR level, trace should be a number that can be decremented > and incremented with two new opcodes > inc_trace and dec_trace. trace mode would be active when the trace > variable is strictly positive. This is useful > for tracing recursive calls.
There are already multiple meanings for various positive trace levels; see, for example, 'trace 1' vs 'trace 4' vs. the and-itive 'trace 5'. > A :trace flag should be implemented for routine and methods to > prepend inc_trace and append dec_trace. I would prefer to see a more generic mechanism that allowed us to add pre- and post- sub execution hooks. (Tcl needs this to be feature complete anyway); You could then wrap up sub invocation with this mechanism to get your desired effect.