summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmdsSZ.c
diff options
context:
space:
mode:
authorferrieux <ferrieux@users.sourceforge.net>2014-09-27 20:28:47 (GMT)
committerferrieux <ferrieux@users.sourceforge.net>2014-09-27 20:28:47 (GMT)
commit2b73bfd8f9c6ba3bd25c0671f33093a0448f41f9 (patch)
tree894a164f60db049455d487ab557fb6f2a02cc2ad /generic/tclCompCmdsSZ.c
parent43921a6b7f362d8ae47b70eb98a7c9b0ff3ee665 (diff)
downloadtcl-2b73bfd8f9c6ba3bd25c0671f33093a0448f41f9.zip
tcl-2b73bfd8f9c6ba3bd25c0671f33093a0448f41f9.tar.gz
tcl-2b73bfd8f9c6ba3bd25c0671f33093a0448f41f9.tar.bz2
Applied patch by Andreas Leitgeb so that [string cat]'s compiled bytecode optimally groups args by 255 for INSTR_STR_CONCAT1.
Diffstat (limited to 'generic/tclCompCmdsSZ.c')
-rw-r--r--generic/tclCompCmdsSZ.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index 2b83fd2..617a520 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -322,8 +322,8 @@ TclCompileStringCatCmd(
CompileWord(envPtr, wordTokenPtr, interp, i);
numArgs ++;
if (numArgs >= 254) { /* 254 to take care of the possible +1 of "folded" above */
- TclEmitInstInt1(INST_STR_CONCAT1, 254, envPtr);
- numArgs -= 253; /* concat pushes 1 obj, the result */
+ TclEmitInstInt1(INST_STR_CONCAT1, numArgs, envPtr);
+ numArgs = 1; /* concat pushes 1 obj, the result */
}
}
wordTokenPtr = TokenAfter(wordTokenPtr);