summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2010-09-27 19:42:37 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2010-09-27 19:42:37 (GMT)
commit869bb6b839721e19027162a8ae89c66d9f5fdbe4 (patch)
tree4d363e5df177abbfaf883365f97c35c5ba84a573 /generic/tclCmdIL.c
parent2efdc538b9f8bd5d53fe38c26db1df0b19e2ede5 (diff)
downloadtcl-869bb6b839721e19027162a8ae89c66d9f5fdbe4.zip
tcl-869bb6b839721e19027162a8ae89c66d9f5fdbe4.tar.gz
tcl-869bb6b839721e19027162a8ae89c66d9f5fdbe4.tar.bz2
* generic/tclBasic.c: [Patch 3072080] (minus the itcl
* generic/tclCmdIL.c: update): a saner NRE. * generic/tclCompExpr.c: * generic/tclCompile.c: This makes TclNRExecuteByteCode * generic/tclCompile.h: (ex TEBC) to be a normal NRE * generic/tclExecute.c: citizen: it loses its special status. * generic/tclInt.decls: The logic flow within the BC engine is * generic/tclInt.h: simplified considerably. * generic/tclIntDecls.h: * generic/tclObj.c: * generic/tclProc.c: * generic/tclTest.c:
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 6c9a623..5ff71a5 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.184 2010/08/22 18:53:26 nijtmans Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.185 2010/09/27 19:42:38 msofer Exp $
*/
#include "tclInt.h"
@@ -1155,11 +1155,22 @@ InfoFrameCmd(
if (iPtr->execEnvPtr->corPtr) {
/*
- * A coroutine: must fix the level computations
+ * A coroutine: must fix the level computations AND the cmdFrame chain,
+ * which is interrupted at the base.
*/
- topLevel += iPtr->execEnvPtr->corPtr->caller.cmdFramePtr->level -
- iPtr->execEnvPtr->corPtr->base.cmdFramePtr->level;
+ CoroutineData *corPtr = iPtr->execEnvPtr->corPtr;
+ CmdFrame *runPtr = iPtr->cmdFramePtr;
+ CmdFrame *lastPtr = NULL;
+
+ topLevel += corPtr->caller.cmdFramePtr->level;
+ while (runPtr && (runPtr != corPtr->caller.cmdFramePtr)) {
+ lastPtr = runPtr;
+ runPtr = runPtr->nextPtr;
+ }
+ if (lastPtr && !runPtr) {
+ lastPtr->nextPtr = corPtr->caller.cmdFramePtr;
+ }
}
if (objc == 1) {