summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-07-11 04:07:39 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-07-11 04:07:39 (GMT)
commit879263daeede5edbf8536cab6eba690b9a7cad4a (patch)
treedd314bf04dc89630af6697fd178f26dde3d2cad7 /generic/tclCompCmds.c
parentfceaf9997d7c45ba92c6c61930207823446f1e50 (diff)
parentac62d0c4970dfe3fa03f4fa77c05d23943a20671 (diff)
downloadtcl-879263daeede5edbf8536cab6eba690b9a7cad4a.zip
tcl-879263daeede5edbf8536cab6eba690b9a7cad4a.tar.gz
tcl-879263daeede5edbf8536cab6eba690b9a7cad4a.tar.bz2
Add a test for each call to SetLineInformation() demonstrating the need
for it to be there. Fixed bugs revealed by the new tests. What's still missing are more tests demonstrating the need for other SetLineInformation() calls that are not there yet. ;)
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index fddf152..a56727d 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -2464,7 +2464,7 @@ CompileEachloopCmd(
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;
DefineLineInformation; /* TIP #280 */
@@ -2504,8 +2504,6 @@ CompileEachloopCmd(
return TCL_ERROR;
}
- bodyIndex = i-1;
-
/*
* Allocate storage for the varcList and varvList arrays if necessary.
*/
@@ -2684,7 +2682,7 @@ CompileEachloopCmd(
* Inline compile the loop body.
*/
- SetLineInformation(bodyIndex);
+ SetLineInformation(numWords - 1);
ExceptionRangeStarts(envPtr, range);
CompileBody(envPtr, bodyTokenPtr, interp);
ExceptionRangeEnds(envPtr, range);