summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-19 17:21:41 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-19 17:21:41 (GMT)
commit91ec52b16e7cd903ca196560e5ddb1d5ca1c60a9 (patch)
treeff53311711566639a9a3f31ab15a21f9e3f9dd44 /generic
parentb290b21a4427ac5d1584ad6fcf61e4934f1bf505 (diff)
downloadtcl-91ec52b16e7cd903ca196560e5ddb1d5ca1c60a9.zip
tcl-91ec52b16e7cd903ca196560e5ddb1d5ca1c60a9.tar.gz
tcl-91ec52b16e7cd903ca196560e5ddb1d5ca1c60a9.tar.bz2
Line numbers wrong in compiled [dict with].
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompCmds.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 64c110d..7e6b6da 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -1875,7 +1875,7 @@ TclCompileDictWithCmd(
tokenPtr = TokenAfter(varTokenPtr);
for (i=2 ; i<parsePtr->numWords-1 ; i++) {
- CompileWord(envPtr, tokenPtr, interp, i-1);
+ CompileWord(envPtr, tokenPtr, interp, i);
tokenPtr = TokenAfter(tokenPtr);
}
TclEmitInstInt4(INST_LIST, parsePtr->numWords-3,envPtr);
@@ -1902,7 +1902,7 @@ TclCompileDictWithCmd(
tokenPtr = varTokenPtr;
for (i=1 ; i<parsePtr->numWords-1 ; i++) {
- CompileWord(envPtr, tokenPtr, interp, i-1);
+ CompileWord(envPtr, tokenPtr, interp, i);
tokenPtr = TokenAfter(tokenPtr);
}
TclEmitInstInt4(INST_LIST, parsePtr->numWords-3,envPtr);
@@ -1916,7 +1916,7 @@ TclCompileDictWithCmd(
* Case: Direct dict in non-simple var with empty body.
*/
- CompileWord(envPtr, varTokenPtr, interp, 0);
+ CompileWord(envPtr, varTokenPtr, interp, 1);
TclEmitOpcode( INST_DUP, envPtr);
TclEmitOpcode( INST_LOAD_STK, envPtr);
PushStringLiteral(envPtr, "");
@@ -1951,13 +1951,13 @@ TclCompileDictWithCmd(
*/
if (dictVar == -1) {
- CompileWord(envPtr, varTokenPtr, interp, 0);
+ CompileWord(envPtr, varTokenPtr, interp, 1);
Emit14Inst( INST_STORE_SCALAR, varNameTmp, envPtr);
}
tokenPtr = TokenAfter(varTokenPtr);
if (gotPath) {
for (i=2 ; i<parsePtr->numWords-1 ; i++) {
- CompileWord(envPtr, tokenPtr, interp, i-1);
+ CompileWord(envPtr, tokenPtr, interp, i);
tokenPtr = TokenAfter(tokenPtr);
}
TclEmitInstInt4( INST_LIST, parsePtr->numWords-3,envPtr);