Subject: Simplify arguments to TclContinuationsEnterDerived().

From: dgp <[email-masked]>
Date: Tue, 16 Jul 2013 14:52:33 +0000

---
 generic/tclCompile.c  |  6 ++----
 generic/tclEnsemble.c | 14 ++++++++------
 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);
     }
 
     /*
-- 
cgit v0.12