diff options
author | dgp <dgp@noemail.net> | 2013-09-19 16:41:04 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2013-09-19 16:41:04 (GMT) |
commit | 4f5511a3af0af4a1aeff9799b1fc6933a3797b7c (patch) | |
tree | 30e41342a646c404ff810147c62840779f5f67f7 /generic/tclCompCmdsGR.c | |
parent | a9d38caae8f0154cf86ff493d6eb3b637c0af1ac (diff) | |
parent | de50b7818b27e7324c6491399a85344a52ac1cad (diff) | |
download | tcl-4f5511a3af0af4a1aeff9799b1fc6933a3797b7c.zip tcl-4f5511a3af0af4a1aeff9799b1fc6933a3797b7c.tar.gz tcl-4f5511a3af0af4a1aeff9799b1fc6933a3797b7c.tar.bz2 |
Line numbers wrong in compiled [global] and [variable].
FossilOrigin-Name: 4b8618f2b24a652e061582ab9578b8d82453360a
Diffstat (limited to 'generic/tclCompCmdsGR.c')
-rw-r--r-- | generic/tclCompCmdsGR.c | 10 |
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); |