diff options
author | msofer <msofer@noemail.net> | 2002-02-26 17:26:24 (GMT) |
---|---|---|
committer | msofer <msofer@noemail.net> | 2002-02-26 17:26:24 (GMT) |
commit | 504bef47cbefb837408049891c7b85d83f21a94f (patch) | |
tree | b05d6bea4104b271a8d740afbc9f21cd848c09d6 /generic | |
parent | 7154ce21a4b46a92c79c288621d6856eaacabee4 (diff) | |
download | tcl-504bef47cbefb837408049891c7b85d83f21a94f.zip tcl-504bef47cbefb837408049891c7b85d83f21a94f.tar.gz tcl-504bef47cbefb837408049891c7b85d83f21a94f.tar.bz2 |
bugfix to the bugfix to the new [for] compiled code
FossilOrigin-Name: 4d5054a6b2daf3a77f26d482c5288e5e65c07345
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; |