summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-06-25 15:01:03 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-06-25 15:01:03 (GMT)
commitedc81d994ec2f31a92dec97ec8dd28d5de990c93 (patch)
tree3e4e1005ba4df21e73d40da3dd105c8ec8d07384
parent3e06ad2586a8f9d60a4702992e166e9838b436a1 (diff)
downloadtcl-edc81d994ec2f31a92dec97ec8dd28d5de990c93.zip
tcl-edc81d994ec2f31a92dec97ec8dd28d5de990c93.tar.gz
tcl-edc81d994ec2f31a92dec97ec8dd28d5de990c93.tar.bz2
Make more use of the CompileTokens() macro.
-rw-r--r--generic/tclCompExpr.c3
-rw-r--r--generic/tclCompile.c8
2 files changed, 4 insertions, 7 deletions
diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c
index efdc2b0..2a48117 100644
--- a/generic/tclCompExpr.c
+++ b/generic/tclCompExpr.c
@@ -2486,8 +2486,7 @@ CompileExprTree(
break;
}
case OT_TOKENS:
- TclCompileTokens(interp, tokenPtr+1, tokenPtr->numComponents,
- envPtr);
+ CompileTokens(envPtr, tokenPtr, interp);
tokenPtr += tokenPtr->numComponents + 1;
break;
default:
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 8cb53f5..ccf8938 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -1936,8 +1936,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);
@@ -2578,7 +2577,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, " ");
}
@@ -2630,8 +2629,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);
}
}