summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-06-21 17:45:39 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-06-21 17:45:39 (GMT)
commit1cf3fb4fff5a0437a76e658e7ed16ef5928cc974 (patch)
treebbe8f01fbeac79727c814740dfea18c88e61f6a9 /generic/tclExecute.c
parentfcd900918cdac647cc943dfa32196fda722d489d (diff)
downloadtcl-1cf3fb4fff5a0437a76e658e7ed16ef5928cc974.zip
tcl-1cf3fb4fff5a0437a76e658e7ed16ef5928cc974.tar.gz
tcl-1cf3fb4fff5a0437a76e658e7ed16ef5928cc974.tar.bz2
* generic/tclBasic.c (TEOvI): Made sure that leave
* generic/tclExecute.c (INST_INVOKE): traces that were created * tests/trace.test (trace-36.2): during execution of an originally untraced command do not fire [Bug 1740962], partial fix.
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 9e74fd3..21109cb 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -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: tclExecute.c,v 1.301 2007/06/20 18:46:12 dgp Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.302 2007/06/21 17:45:40 msofer Exp $
*/
#include "tclInt.h"
@@ -2000,9 +2000,21 @@ TclExecuteByteCode(
DECACHE_STACK_INFO();
cmdPtr = (Command *) Tcl_GetCommandFromObj(interp, objv[0]);
- if (cmdPtr && !(cmdPtr->flags & CMD_HAS_EXEC_TRACES)
- && iPtr->tracePtr == NULL) {
- result = TclEvalObjvInternal(interp, objc, objv, NULL, 0, 0);
+ if (cmdPtr
+ && !((cmdPtr->flags & CMD_HAS_EXEC_TRACES) || iPtr->tracePtr)
+ && !(checkInterp && (codePtr->compileEpoch != iPtr->compileEpoch))
+ ) {
+ cmdPtr->refCount++;
+ iPtr->cmdCount++;
+ result = (*cmdPtr->objProc)(cmdPtr->objClientData, interp, objc, objv);
+
+ if (Tcl_AsyncReady()) {
+ result = Tcl_AsyncInvoke(interp, result);
+ }
+ if (result == TCL_OK && TclLimitReady(iPtr->limit)) {
+ result = Tcl_LimitCheck(interp);
+ }
+ TclCleanupCommandMacro(cmdPtr);
} else {
/*
* If trace procedures will be called, we need a command