summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2007-04-17 20:06:18 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2007-04-17 20:06:18 (GMT)
commit372594a4ce239511deada5573dcbe7e9463e4028 (patch)
tree776ce20aa2ad1f2fa7c4f207e7a73054fe08cae3 /generic/tclExecute.c
parent7ab521d768effeec66e8d06abf0067ce0652a57f (diff)
downloadtcl-372594a4ce239511deada5573dcbe7e9463e4028.zip
tcl-372594a4ce239511deada5573dcbe7e9463e4028.tar.gz
tcl-372594a4ce239511deada5573dcbe7e9463e4028.tar.bz2
* generic/tclExecute.c: fixed checkInterp logic [Bug 1702212]
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c19
1 files changed, 11 insertions, 8 deletions
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;