diff options
author | dgp <dgp@users.sourceforge.net> | 2013-07-11 03:48:40 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-07-11 03:48:40 (GMT) |
commit | 6f4f29670680e5ace35ab03d96c112fde1e45ff6 (patch) | |
tree | 81df4267b7d4a79d9f79ca92e4680932ba229f25 /generic | |
parent | 75bc23d59cf4ad60a7f0e10ad939564c9bfb4ec3 (diff) | |
download | tcl-6f4f29670680e5ace35ab03d96c112fde1e45ff6.zip tcl-6f4f29670680e5ace35ab03d96c112fde1e45ff6.tar.gz tcl-6f4f29670680e5ace35ab03d96c112fde1e45ff6.tar.bz2 |
Add tests for the SetLineInformation() calls in tclEnsemble.c, and fix
the bugs around those calls exposed by the tests.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclEnsemble.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c index d654bbf..794a059 100644 --- a/generic/tclEnsemble.c +++ b/generic/tclEnsemble.c @@ -3168,6 +3168,7 @@ CompileToInvokedCommand( bytes = Tcl_GetStringFromObj(words[i-1], &length); PushLiteral(envPtr, bytes, length); } else if (tokPtr->type == TCL_TOKEN_SIMPLE_WORD) { + /* TODO: Check about registering Cmd Literals here */ int literal = TclRegisterNewLiteral(envPtr, tokPtr[1].start, tokPtr[1].size); @@ -3179,9 +3180,7 @@ CompileToInvokedCommand( } TclEmitPush(literal, envPtr); } else { - if (envPtr->clNext) { - SetLineInformation(i); - } + LineInformation(i); CompileTokens(envPtr, tokPtr, interp); } tokPtr = TokenAfter(tokPtr); @@ -3255,12 +3254,10 @@ CompileBasicNArgCommand( tokenPtr = TokenAfter(parsePtr->tokenPtr); for (i=1 ; i<parsePtr->numWords ; i++) { - if (envPtr->clNext) { - SetLineInformation(i); - } if (tokenPtr->type == TCL_TOKEN_SIMPLE_WORD) { PushLiteral(envPtr, tokenPtr[1].start, tokenPtr[1].size); } else { + LineInformation(i); CompileTokens(envPtr, tokenPtr, interp); } tokenPtr = TokenAfter(tokenPtr); |