summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-07-16 14:52:33 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-07-16 14:52:33 (GMT)
commite783ef57ec6e0ab2d08f1524e86cbc849e36f763 (patch)
treed5d6d3f10ed96a8021575236367e918d8fd999be /generic
parent2d98ee0f477ef33bb0a8473efbd44ef203463c32 (diff)
downloadtcl-e783ef57ec6e0ab2d08f1524e86cbc849e36f763.zip
tcl-e783ef57ec6e0ab2d08f1524e86cbc849e36f763.tar.gz
tcl-e783ef57ec6e0ab2d08f1524e86cbc849e36f763.tar.bz2
Simplify arguments to TclContinuationsEnterDerived().
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompile.c6
-rw-r--r--generic/tclEnsemble.c14
2 files changed, 10 insertions, 10 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 7e0be76..bc7501a 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -1805,8 +1805,7 @@ TclCompileInvocation(
tokenPtr[1].start, tokenPtr[1].size);
if (envPtr->clNext) {
TclContinuationsEnterDerived(TclFetchLiteral(envPtr, objIdx),
- tokenPtr[1].start - envPtr->source,
- mapPtr->loc[eclIndex].next[wordIdx]);
+ tokenPtr[1].start - envPtr->source, envPtr->clNext);
}
TclEmitPush(objIdx, envPtr);
}
@@ -1855,8 +1854,7 @@ CompileExpanded(
tokenPtr[1].start, tokenPtr[1].size);
if (envPtr->clNext) {
TclContinuationsEnterDerived(TclFetchLiteral(envPtr, objIdx),
- tokenPtr[1].start - envPtr->source,
- mapPtr->loc[eclIndex].next[wordIdx]);
+ tokenPtr[1].start - envPtr->source, envPtr->clNext);
}
TclEmitPush(objIdx, envPtr);
}
diff --git a/generic/tclEnsemble.c b/generic/tclEnsemble.c
index 9b6ca92..864283b 100644
--- a/generic/tclEnsemble.c
+++ b/generic/tclEnsemble.c
@@ -3163,12 +3163,16 @@ CompileToInvokedCommand(
*/
Tcl_ListObjGetElements(NULL, replacements, &numWords, &words);
- for (i=0,tokPtr=parsePtr->tokenPtr ; i<parsePtr->numWords ; i++) {
+ for (i = 0, tokPtr = parsePtr->tokenPtr; i < parsePtr->numWords;
+ i++, tokPtr = TokenAfter(tokPtr)) {
if (i > 0 && i < numWords+1) {
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 */
+ continue;
+ }
+
+ SetLineInformation(i);
+ if (tokPtr->type == TCL_TOKEN_SIMPLE_WORD) {
int literal = TclRegisterNewLiteral(envPtr,
tokPtr[1].start, tokPtr[1].size);
@@ -3176,14 +3180,12 @@ CompileToInvokedCommand(
TclContinuationsEnterDerived(
TclFetchLiteral(envPtr, literal),
tokPtr[1].start - envPtr->source,
- mapPtr->loc[eclIndex].next[i]);
+ envPtr->clNext);
}
TclEmitPush(literal, envPtr);
} else {
- SetLineInformation(i);
CompileTokens(envPtr, tokPtr, interp);
}
- tokPtr = TokenAfter(tokPtr);
}
/*