summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmdsGR.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-19 16:41:04 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-19 16:41:04 (GMT)
commit34f5e7a008848bf85a6a5bf4d838aa3d8d21cd07 (patch)
treed4c31e2e16495e07b1372e8a4d4fe71c7a17bac8 /generic/tclCompCmdsGR.c
parent948a08dad17b744ed2527bc494a3f9b5ccd53ee7 (diff)
parent44d124101c6297b356f7de3917c4d0666b8a0e31 (diff)
downloadtcl-34f5e7a008848bf85a6a5bf4d838aa3d8d21cd07.zip
tcl-34f5e7a008848bf85a6a5bf4d838aa3d8d21cd07.tar.gz
tcl-34f5e7a008848bf85a6a5bf4d838aa3d8d21cd07.tar.bz2
Line numbers wrong in compiled [global] and [variable].
Diffstat (limited to 'generic/tclCompCmdsGR.c')
-rw-r--r--generic/tclCompCmdsGR.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c
index a61fc85..4e4a3af 100644
--- a/generic/tclCompCmdsGR.c
+++ b/generic/tclCompCmdsGR.c
@@ -85,14 +85,17 @@ TclCompileGlobalCmd(
*/
varTokenPtr = TokenAfter(parsePtr->tokenPtr);
- for (i=2; i<=numWords; varTokenPtr = TokenAfter(varTokenPtr),i++) {
+ for (i=1; i<numWords; varTokenPtr = TokenAfter(varTokenPtr),i++) {
localIndex = IndexTailVarIfKnown(interp, varTokenPtr, envPtr);
if (localIndex < 0) {
return TCL_ERROR;
}
- CompileWord(envPtr, varTokenPtr, interp, 1);
+ /* TODO: Consider what value can pass throug the
+ * IndexTailVarIfKnown() screen. Full CompileWord()
+ * likely does not apply here. Push known value instead. */
+ CompileWord(envPtr, varTokenPtr, interp, i);
TclEmitInstInt4( INST_NSUPVAR, localIndex, envPtr);
}
@@ -2706,6 +2709,9 @@ TclCompileVariableCmd(
return TCL_ERROR;
}
+ /* TODO: Consider what value can pass throug the
+ * IndexTailVarIfKnown() screen. Full CompileWord()
+ * likely does not apply here. Push known value instead. */
CompileWord(envPtr, varTokenPtr, interp, i);
TclEmitInstInt4( INST_VARIABLE, localIndex, envPtr);