summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authortwylite <twylite@crypt.co.za>2012-08-08 15:28:09 (GMT)
committertwylite <twylite@crypt.co.za>2012-08-08 15:28:09 (GMT)
commit540f62b18de23e912d85b8b0fe9ea4f35dda0d2b (patch)
treebfaea5c03c7fc848c1e05747d300c89b91112b05 /generic/tclCompCmds.c
parent79878e7af5ae502d353130a4cca867147152bfc2 (diff)
downloadtcl-540f62b18de23e912d85b8b0fe9ea4f35dda0d2b.zip
tcl-540f62b18de23e912d85b8b0fe9ea4f35dda0d2b.tar.gz
tcl-540f62b18de23e912d85b8b0fe9ea4f35dda0d2b.tar.bz2
Back-out 'foreacha' implementation but leave code cleanup of 'mapeach' and 'dict map'.
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 07a5eea..395a0f8 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -1911,9 +1911,9 @@ TclCompileForCmd(
/*
*----------------------------------------------------------------------
*
- * TclCompileForeachCmd, TclCompileForeachaCmd --
+ * TclCompileForeachCmd --
*
- * Procedure called to compile the "foreach" and "foreacha" commands.
+ * Procedure called to compile the "foreach" command.
*
* Results:
* Returns TCL_OK for a successful compile. Returns TCL_ERROR to defer
@@ -1937,18 +1937,6 @@ TclCompileForeachCmd(
{
return TclCompileEachloopCmd(interp, parsePtr, cmdPtr, envPtr, 0);
}
-
-int
-TclCompileForeachaCmd(
- Tcl_Interp *interp, /* Used for error reporting. */
- Tcl_Parse *parsePtr, /* Points to a parse structure for the command
- * created by Tcl_ParseCommand. */
- Command *cmdPtr, /* Points to defintion of command being
- * compiled. */
- CompileEnv *envPtr) /* Holds resulting instructions. */
-{
- return TclCompileEachloopCmd(interp, parsePtr, cmdPtr, envPtr, 2);
-}
/*
*----------------------------------------------------------------------
@@ -2136,7 +2124,6 @@ TclCompileEachloopCmd(
infoPtr->numLists = numLists;
infoPtr->firstValueTemp = firstValueTemp;
infoPtr->loopCtTemp = loopCtTemp;
- infoPtr->collect = collect;
for (loopIndex = 0; loopIndex < numLists; loopIndex++) {
ForeachVarList *varListPtr;
@@ -2150,9 +2137,6 @@ TclCompileEachloopCmd(
varListPtr->varIndexes[j] = TclFindCompiledLocal(varName,
nameChars, /*create*/ 1, envPtr);
- if ((collect == TCL_EACH_ACCUM) && ((loopIndex + j) == 0)) {
- collectTemp = varListPtr->varIndexes[j];
- }
}
infoPtr->varLists[loopIndex] = varListPtr;
}
@@ -2344,7 +2328,6 @@ DupForeachInfo(
dupPtr->numLists = numLists;
dupPtr->firstValueTemp = srcPtr->firstValueTemp;
dupPtr->loopCtTemp = srcPtr->loopCtTemp;
- dupPtr->collect = srcPtr->collect;
for (i = 0; i < numLists; i++) {
srcListPtr = srcPtr->varLists[i];
@@ -2435,8 +2418,6 @@ PrintForeachInfo(
}
Tcl_AppendPrintfToObj(appendObj, "], loop=%%v%u",
(unsigned) infoPtr->loopCtTemp);
- Tcl_AppendPrintfToObj(appendObj, "], collect=%%v%u",
- (unsigned) infoPtr->collect);
for (i=0 ; i<infoPtr->numLists ; i++) {
if (i) {
Tcl_AppendToObj(appendObj, ",", -1);