Tcl Source Code

Artifact [7e39b6be12]
Login

Artifact 7e39b6be12f1fcf9c24cc668e0a5dad910b6d320:

Attachment "checkInterp-new" to ticket [1702212fff] added by msofer 2007-04-18 03:06:44.
Index: generic/tclExecute.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclExecute.c,v
retrieving revision 1.277
diff -u -r1.277 tclExecute.c
--- generic/tclExecute.c	17 Apr 2007 14:40:32 -0000	1.277
+++ generic/tclExecute.c	17 Apr 2007 19:59:53 -0000
@@ -183,11 +183,11 @@
  */
 
 #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 @@
 	 */
 
 	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 @@
 #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;