summaryrefslogtreecommitdiffstats
path: root/generic/tclEnsemble.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2013-07-10 18:02:20 (GMT)
committerdgp <dgp@noemail.net>2013-07-10 18:02:20 (GMT)
commit30ce5307ed2960ab717de84600393aab1d54e439 (patch)
treee37dd9b8593afd27f2af2afe1206244948fad499 /generic/tclEnsemble.c
parent665c86f84cea24351349abbe64b4ce485b10876f (diff)
parentf808e62b2d87601e93319ac274a6d082d59af29f (diff)
downloadtcl-30ce5307ed2960ab717de84600393aab1d54e439.zip
tcl-30ce5307ed2960ab717de84600393aab1d54e439.tar.gz
tcl-30ce5307ed2960ab717de84600393aab1d54e439.tar.bz2
merge trunk
FossilOrigin-Name: 4e4f10a76c7fcf7f8010042f8df560292c5998d2
Diffstat (limited to 'generic/tclEnsemble.c')
-rw-r--r--generic/tclEnsemble.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index e0aa0c4..d654bbf 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -3049,6 +3049,7 @@ CompileToCompiledCommand(
int savedNumCmds = envPtr->numCommands;
int savedStackDepth = envPtr->currStackDepth;
unsigned savedCodeNext = envPtr->codeNext - envPtr->codeStart;
+ DefineLineInformation;
if (cmdPtr->compileProc == NULL) {
return TCL_ERROR;
@@ -3097,12 +3098,27 @@ CompileToCompiledCommand(
}
/*
+ * Shift the line information arrays to account for different word
+ * index values.
+ */
+
+ mapPtr->loc[eclIndex].line += (depth - 1);
+ mapPtr->loc[eclIndex].next += (depth - 1);
+
+ /*
* Hand off compilation to the subcommand compiler. At last!
*/
result = cmdPtr->compileProc(interp, &synthetic, cmdPtr, envPtr);
/*
+ * Undo the shift.
+ */
+
+ mapPtr->loc[eclIndex].line -= (depth - 1);
+ mapPtr->loc[eclIndex].next -= (depth - 1);
+
+ /*
* If our target fails to compile, revert the number of commands and the
* pointer to the place to issue the next instruction. [Bug 3600328]
*/