diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2002-02-26 17:26:25 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2002-02-26 17:26:25 (GMT) |
commit | 255e0a50dce41cdbdb200cbb5714d9247467bd63 (patch) | |
tree | b05d6bea4104b271a8d740afbc9f21cd848c09d6 /generic | |
parent | d181088ff738547a9a7dce8decab6c860a4b9664 (diff) | |
download | tcl-255e0a50dce41cdbdb200cbb5714d9247467bd63.zip tcl-255e0a50dce41cdbdb200cbb5714d9247467bd63.tar.gz tcl-255e0a50dce41cdbdb200cbb5714d9247467bd63.tar.bz2 |
bugfix to the bugfix to the new [for] compiled code
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCompCmds.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index c3b731f..2b8f398 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCompCmds.c,v 1.26 2002/02/25 14:15:10 msofer Exp $ + * RCS: @(#) $Id: tclCompCmds.c,v 1.27 2002/02/26 17:26:25 msofer Exp $ */ #include "tclInt.h" @@ -605,8 +605,9 @@ TclCompileForCmd(interp, parsePtr, envPtr) * Compile the "next" subcommand. */ - envPtr->currStackDepth = savedStackDepth; nextCodeOffset = (envPtr->codeNext - envPtr->codeStart); + + envPtr->currStackDepth = savedStackDepth; code = TclCompileCmdWord(interp, nextTokenPtr+1, nextTokenPtr->numComponents, envPtr); envPtr->currStackDepth = savedStackDepth + 1; @@ -619,7 +620,7 @@ TclCompileForCmd(interp, parsePtr, envPtr) } envPtr->exceptArrayPtr[nextRange].numCodeBytes = (envPtr->codeNext - envPtr->codeStart) - - envPtr->exceptArrayPtr[nextRange].codeOffset; + - nextCodeOffset; TclEmitOpcode(INST_POP, envPtr); envPtr->currStackDepth = savedStackDepth; @@ -629,6 +630,7 @@ TclCompileForCmd(interp, parsePtr, envPtr) */ testCodeOffset = (envPtr->codeNext - envPtr->codeStart); + jumpDist = testCodeOffset - jumpEvalCondFixup.codeOffset; if (TclFixupForwardJump(envPtr, &jumpEvalCondFixup, jumpDist, 127)) { bodyCodeOffset += 3; |