summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2013-07-07 11:57:55 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2013-07-07 11:57:55 (GMT)
commit5703a8e2b37f931de4a54b10dc8dd269848da9bb (patch)
tree8a52daeeeffe1dda4fcd72e1e04d418557ef6a55 /generic/tclCompile.c
parent2859532759626d4782896f4c151bf58a668da85b (diff)
parent2dd82db7ae9e5978aeb64744956d20f14f0d99aa (diff)
downloadtcl-5703a8e2b37f931de4a54b10dc8dd269848da9bb.zip
tcl-5703a8e2b37f931de4a54b10dc8dd269848da9bb.tar.gz
tcl-5703a8e2b37f931de4a54b10dc8dd269848da9bb.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c13
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);
}
}