diff options
| author | Kevin B Kenny <kennykb@acm.org> | 2010-09-27 20:33:37 (GMT) |
|---|---|---|
| committer | Kevin B Kenny <kennykb@acm.org> | 2010-09-27 20:33:37 (GMT) |
| commit | e7e975cd6f4d6d27ec49946ba6b5d6aeb0d75689 (patch) | |
| tree | 7230190020b96b7377c7a1e8d4bc809e6c6ccd15 /generic/tclCmdIL.c | |
| parent | b5bc78c17be16102c70991d3090dc85aa9baf44b (diff) | |
| download | tcl-e7e975cd6f4d6d27ec49946ba6b5d6aeb0d75689.zip tcl-e7e975cd6f4d6d27ec49946ba6b5d6aeb0d75689.tar.gz tcl-e7e975cd6f4d6d27ec49946ba6b5d6aeb0d75689.tar.bz2 | |
Merged from HEAD.
Also replaced a funky NRCallTEBC with the new call TclNRExecuteByteCode.
Diffstat (limited to 'generic/tclCmdIL.c')
| -rw-r--r-- | generic/tclCmdIL.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 6c9a623..44a3bf3 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.184.2.1 2010/09/27 20:33:37 kennykb 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) { |
