diff options
author | dgp <dgp@noemail.net> | 2013-07-10 17:58:45 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2013-07-10 17:58:45 (GMT) |
commit | f808e62b2d87601e93319ac274a6d082d59af29f (patch) | |
tree | fde1c6d4932abfcd23d44beb2bf7bb3dd564da5d /generic/tclEnsemble.c | |
parent | d3983328a80bd5cd11fe4aa7f5c36381149e6124 (diff) | |
download | tcl-f808e62b2d87601e93319ac274a6d082d59af29f.zip tcl-f808e62b2d87601e93319ac274a6d082d59af29f.tar.gz tcl-f808e62b2d87601e93319ac274a6d082d59af29f.tar.bz2 |
Fix for [86fb5ea28e]. Test will eventually merge in from tip280-test-coverage.
FossilOrigin-Name: ca488c3bfec9e01e81f06c5598038b6556e5a831
Diffstat (limited to 'generic/tclEnsemble.c')
-rw-r--r-- | generic/tclEnsemble.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index 813e056..a718d0e 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -3059,6 +3059,7 @@ CompileToCompiledCommand( int savedNumCmds = envPtr->numCommands; int savedStackDepth = envPtr->currStackDepth; unsigned savedCodeNext = envPtr->codeNext - envPtr->codeStart; + DefineLineInformation; if (cmdPtr->compileProc == NULL) { return TCL_ERROR; @@ -3107,12 +3108,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] */ |