diff options
author | ferrieux <ferrieux@noemail.net> | 2014-09-27 20:28:47 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@noemail.net> | 2014-09-27 20:28:47 (GMT) |
commit | f9fc1062bf70608db5e1843243bafd42fb010783 (patch) | |
tree | f23047ce8103efc28ce0c7e4d80a4a9411bf872d /generic/tclCompCmdsSZ.c | |
parent | 59b61728f493373c146652599cbda935f01e6781 (diff) | |
download | tcl-f9fc1062bf70608db5e1843243bafd42fb010783.zip tcl-f9fc1062bf70608db5e1843243bafd42fb010783.tar.gz tcl-f9fc1062bf70608db5e1843243bafd42fb010783.tar.bz2 |
Applied patch by Andreas Leitgeb so that [string cat]'s compiled bytecode optimally groups args by 255 for INSTR_STR_CONCAT1.
FossilOrigin-Name: 32c3cbf245f8df1128ac87c2a6d6ecd52cf8f74e
Diffstat (limited to 'generic/tclCompCmdsSZ.c')
-rw-r--r-- | generic/tclCompCmdsSZ.c | 4 |
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); |