diff options
| author | dgp@users.sourceforge.net <dgp> | 2013-09-19 12:20:13 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2013-09-19 12:20:13 (GMT) |
| commit | 2a2343f953fb90ce6cf4e37515d378c673060a1e (patch) | |
| tree | 99e3b9a0a6a5a8038009b04e891bdd51ec13462c /generic/tclCompCmds.c | |
| parent | 484a6ea78d3c2930cf920cb5d8000060e9da402c (diff) | |
| download | tcl-2a2343f953fb90ce6cf4e37515d378c673060a1e.zip tcl-2a2343f953fb90ce6cf4e37515d378c673060a1e.tar.gz tcl-2a2343f953fb90ce6cf4e37515d378c673060a1e.tar.bz2 | |
Line numbers wrong in compiled foreach body.
Diffstat (limited to 'generic/tclCompCmds.c')
| -rw-r--r-- | generic/tclCompCmds.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c index fa4762d..2013568 100644 --- a/generic/tclCompCmds.c +++ b/generic/tclCompCmds.c @@ -1628,7 +1628,7 @@ TclCompileForeachCmd( Tcl_Token *tokenPtr, *bodyTokenPtr; unsigned char *jumpPc; JumpFixup jumpFalseFixup; - int jumpBackDist, jumpBackOffset, infoIndex, range, bodyIndex; + int jumpBackDist, jumpBackOffset, infoIndex, range; int numWords, numLists, numVars, loopIndex, tempVar, i, j, code; int savedStackDepth = envPtr->currStackDepth; DefineLineInformation; /* TIP #280 */ @@ -1669,8 +1669,6 @@ TclCompileForeachCmd( return TCL_ERROR; } - bodyIndex = i-1; - /* * Allocate storage for the varcList and varvList arrays if necessary. */ @@ -1837,7 +1835,7 @@ TclCompileForeachCmd( * Inline compile the loop body. */ - SetLineInformation (bodyIndex); + SetLineInformation (numWords - 1); ExceptionRangeStarts(envPtr, range); CompileBody(envPtr, bodyTokenPtr, interp); ExceptionRangeEnds(envPtr, range); |
