Subject: Removing a few changes that were not actually needed, and correcting comments.

From: dkf <[email-masked]>
Date: Wed, 15 May 2013 10:56:41 +0000

---
 generic/tclAssembly.c |  2 +-
 generic/tclCompile.c  | 15 ++++++---------
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c
index cd2ad13..fff7b43 100644
--- a/generic/tclAssembly.c
+++ b/generic/tclAssembly.c
@@ -20,7 +20,7 @@
  *-   break and continue - if exception ranges can be sorted out.
  *-   foreach_start4, foreach_step4
  *-   returnImm, returnStk
- *-   expandStart, expandStkTop, invokeExpanded, listExpanded
+ *-   expandStart, expandStkTop, invokeExpanded
  *-   dictFirst, dictNext, dictDone
  *-   dictUpdateStart, dictUpdateEnd
  *-   jumpTable testing
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 6d07189..1d1a680 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -283,8 +283,9 @@ const InstructionDesc const tclInstructionTable[] = {
      * NOTE: the stack effects of expandStkTop and invokeExpanded are wrong -
      * but it cannot be done right at compile time, the stack effect is only
      * known at run time. The value for invokeExpanded is estimated better at
-     * compile time.  See the comments further down in this file, where
-     * INST_INVOKE_EXPANDED is emitted.
+     * compile time.
+     * See the comments further down in this file, where INST_INVOKE_EXPANDED
+     * is emitted.
      */
     {"expandStart",       1,    0,          0,	{OPERAND_NONE}},
 	/* Start of command with {*} (expanded) arguments */
@@ -1916,8 +1917,7 @@ TclCompileScript(
 		parsePtr->commandStart - envPtr->source);
 
 	if (parsePtr->numWords > 0) {
-	    int expand = 0;	/* Set to the relevant expansion instruction
-				 * if there are dynamic expansions to
+	    int expand = 0;	/* Set if there are dynamic expansions to
 				 * handle */
 
 	    /*
@@ -1971,7 +1971,7 @@ TclCompileScript(
 		    wordIdx < parsePtr->numWords;
 		    wordIdx++, tokenPtr += tokenPtr->numComponents + 1) {
 		if (tokenPtr->type == TCL_TOKEN_EXPAND_WORD) {
-		    expand = INST_INVOKE_EXPANDED;
+		    expand = 1;
 		    break;
 		}
 	    }
@@ -2225,12 +2225,9 @@ TclCompileScript(
 		 * Note that the estimates are not correct while the command
 		 * is being prepared and run, INST_EXPAND_STKTOP is not
 		 * stack-neutral in general.
-		 *
-		 * The opcode that may be issued here (assumed to be non-zero)
-		 * is INST_INVOKE_EXPANDED.
 		 */
 
-		TclEmitOpcode(expand, envPtr);
+		TclEmitOpcode(INST_INVOKE_EXPANDED, envPtr);
 		TclAdjustStackDepth(1 - wordIdx, envPtr);
 	    } else if (wordIdx > 0) {
 		/*
-- 
cgit v0.12