diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-05-15 10:56:41 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-05-15 10:56:41 (GMT) |
commit | 3c57bdf2836715776785db896771e09c365b0b10 (patch) | |
tree | cef59568789b56bafd8a894d47c4bd7af013a290 | |
parent | 11c5978c7cda0bf46476cb97f0944233d8df8462 (diff) | |
download | tcl-3c57bdf2836715776785db896771e09c365b0b10.zip tcl-3c57bdf2836715776785db896771e09c365b0b10.tar.gz tcl-3c57bdf2836715776785db896771e09c365b0b10.tar.bz2 |
Removing a few changes that were not actually needed, and correcting comments.
-rw-r--r-- | generic/tclAssembly.c | 2 | ||||
-rw-r--r-- | 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) { /* |