diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2007-06-09 20:12:53 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2007-06-09 20:12:53 (GMT) |
commit | a4338c631ef67bfe928e7764ab1fc89d0a3a2e62 (patch) | |
tree | c9cb6877f88fcbfad1512aa0fd12c16dc9738a77 /generic/tclInt.h | |
parent | c17b51664c1993d118f7a0611afc339d8e84d1c3 (diff) | |
download | tcl-a4338c631ef67bfe928e7764ab1fc89d0a3a2e62.zip tcl-a4338c631ef67bfe928e7764ab1fc89d0a3a2e62.tar.gz tcl-a4338c631ef67bfe928e7764ab1fc89d0a3a2e62.tar.bz2 |
* generic/tclBasic.c: Split TEOv in two, by separating a
processor for non-TCL_OK returns. Also spli TEOvI in a full
version that handles non-existing and traced commands, and a
separate shorter version for the regular case.
* generic/tclBasic.c: Moved the generation of command strings for
* generic/tclTrace.c: traces: previously in Tcl_EvalObjv(), now
in TclCheck[Interp|Execution]Traces(). Also insured that the
strings are properly nul terminated at the correct length
[Bug 1693986]
* generic/tclBasic.c: Extend usage of TclLimitReady() and
* generic/tclExecute.c: (new) TclLimitExceeded() macros.
* generic/tclInt.h:
* generic/tclInterp.c:
* generic/tclInt.h: New TclCleanupCommandMacro for core usage.
* generic/tclBasic.c:
* generic/tclExecute.c:
* generic/tclObj.c:
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index ba41155..0387496 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.313 2007/06/05 17:57:07 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.314 2007/06/09 20:12:55 msofer Exp $ */ #ifndef _TCLINT @@ -3403,6 +3403,41 @@ MODULE_SCOPE void TclBNInitBignumFromWideUInt(mp_int *bignum, #define TclIsNaN(d) ((d) != (d)) #endif +/* + *---------------------------------------------------------------- + * Inline version of TclCleanupCommand; still need the function as it is in + * the internal stubs, but the core can use the macro instead. + */ + +#define TclCleanupCommandMacro(cmdPtr) \ + if ((cmdPtr)->refCount <= 0) { \ + ckfree((char *) (cmdPtr));\ + } + +/* + *---------------------------------------------------------------- + * Inline versions of Tcl_LimitReady() and Tcl_LimitExceeded to limit number + * of calls out of the critical path. Note that this code isn't particularly + * readable; the non-inline version (in tclInterp.c) is much easier to + * understand. Note also that these macros takes different args (iPtr->limit) + * to the non-inline version. + */ + +#define TclLimitExceeded(limit) ((limit).exceeded != 0) + +#define TclLimitReady(limit) \ + (((limit).active == 0) ? 0 : \ + (++(limit).granularityTicker, \ + ((((limit).active & TCL_LIMIT_COMMANDS) && \ + (((limit).cmdGranularity == 1) || \ + ((limit).granularityTicker % (limit).cmdGranularity == 0))) \ + ? 1 : \ + (((limit).active & TCL_LIMIT_TIME) && \ + (((limit).timeGranularity == 1) || \ + ((limit).granularityTicker % (limit).timeGranularity == 0)))\ + ? 1 : 0))) + + #include "tclPort.h" #include "tclIntDecls.h" #include "tclIntPlatDecls.h" |