summaryrefslogtreecommitdiffstats
path: root/generic/tclEnsemble.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-07-11 03:48:40 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-07-11 03:48:40 (GMT)
commitf3a1a26516d79b15224325941f72deb7dfda25f6 (patch)
tree81df4267b7d4a79d9f79ca92e4680932ba229f25 /generic/tclEnsemble.c
parentfe3f5136f96353b1b0d77700e4c4ef6256eb1e55 (diff)
downloadtcl-f3a1a26516d79b15224325941f72deb7dfda25f6.zip
tcl-f3a1a26516d79b15224325941f72deb7dfda25f6.tar.gz
tcl-f3a1a26516d79b15224325941f72deb7dfda25f6.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/tclEnsemble.c')
-rw-r--r--generic/tclEnsemble.c9
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);