diff options
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r-- | generic/tclCompile.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index aee711c..f2da265 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -1918,8 +1918,7 @@ TclCompileScript( * The word is not a simple string of characters. */ - TclCompileTokens(interp, tokenPtr+1, - tokenPtr->numComponents, envPtr); + CompileTokens(envPtr, tokenPtr, interp); if (expand && tokenPtr->type == TCL_TOKEN_EXPAND_WORD) { TclEmitInstInt4(INST_EXPAND_STKTOP, envPtr->currStackDepth, envPtr); @@ -2081,6 +2080,7 @@ TclCompileScript( * Emit an invoke instruction for the command. We skip this if a * compile procedure was found for the command. */ + assert(wordIdx > 0); if (expand) { /* @@ -2102,7 +2102,7 @@ TclCompileScript( TclEmitOpcode(INST_INVOKE_EXPANDED, envPtr); envPtr->expandCount--; TclAdjustStackDepth(1 - wordIdx, envPtr); - } else if (wordIdx > 0) { + } else { /* * Save PC -> command map for the TclArgumentBC* functions. */ @@ -2174,8 +2174,6 @@ TclCompileScript( if (envPtr->codeNext == entryCodeNext) { PushStringLiteral(envPtr, ""); } - - envPtr->numSrcBytes = p - script; } /* @@ -2562,7 +2560,7 @@ TclCompileExprWords( wordPtr = tokenPtr; for (i = 0; i < numWords; i++) { - TclCompileTokens(interp, wordPtr+1, wordPtr->numComponents, envPtr); + CompileTokens(envPtr, wordPtr, interp); if (i < (numWords - 1)) { PushStringLiteral(envPtr, " "); } @@ -2614,8 +2612,7 @@ TclCompileNoOp( tokenPtr = tokenPtr + tokenPtr->numComponents + 1; if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) { - TclCompileTokens(interp, tokenPtr+1, tokenPtr->numComponents, - envPtr); + CompileTokens(envPtr, tokenPtr, interp); TclEmitOpcode(INST_POP, envPtr); } } |