summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclExecute.c19
2 files changed, 16 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 729b65a..445f619 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-04-17 Miguel Sofer <msofer@users.sf.net>
+
+ * generic/tclExecute.c: fixed checkInterp logic [Bug 1702212]
+
2007-04-16 Donal K. Fellows <donal.k.fellows@man.ac.uk>
* various (including generic/tclTest.c): Complete the purge of K&R
@@ -14,7 +18,7 @@
2007-04-14 Miguel Sofer <msofer@users.sf.net>
- * generic/tclExecute.c: removed some code at INSTEXPAND_SKTOP that
+ * generic/tclExecute.c: removed some code at INST_EXPAND_SKTOP that
duplicates functionality already present at checkForCatch.
2007-04-12 Miguel Sofer <msofer@users.sf.net>
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index f967b14..00a3509 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.277 2007/04/17 14:40:32 dkf Exp $
+ * RCS: @(#) $Id: tclExecute.c,v 1.278 2007/04/17 20:06:18 msofer Exp $
*/
#include "tclInt.h"
@@ -183,11 +183,11 @@ long tclObjsShared[TCL_MAX_SHARED_OBJ_STATS] = { 0, 0, 0, 0, 0 };
*/
#define CACHE_STACK_INFO() \
- tosPtr = eePtr->tosPtr
+ tosPtr = eePtr->tosPtr;\
+ checkInterp = 1
#define DECACHE_STACK_INFO() \
- eePtr->tosPtr = tosPtr;\
- checkInterp = 1
+ eePtr->tosPtr = tosPtr
/*
* Macros used to access items on the Tcl evaluation stack. PUSH_OBJECT
@@ -1512,10 +1512,8 @@ TclExecuteByteCode(
*/
iPtr->cmdCount += TclGetUInt4AtPtr(pc+5);
- if (!checkInterp ||
- (((codePtr->compileEpoch == iPtr->compileEpoch)
- && (codePtr->nsEpoch == namespacePtr->resolverEpoch))
- || (codePtr->flags & TCL_BYTECODE_PRECOMPILED))) {
+ if (!checkInterp) {
+ instStartCmdOK:
#if 0 && !TCL_COMPILE_DEBUG
/*
* Peephole optimisations: check if there are several
@@ -1536,6 +1534,11 @@ TclExecuteByteCode(
#else
NEXT_INST_F(9, 0, 0);
#endif
+ } else if (((codePtr->compileEpoch == iPtr->compileEpoch)
+ && (codePtr->nsEpoch == namespacePtr->resolverEpoch))
+ || (codePtr->flags & TCL_BYTECODE_PRECOMPILED)) {
+ checkInterp = 0;
+ goto instStartCmdOK;
} else {
const char *bytes;
int length, opnd;