.
D 2005-03-17T23:42:19
J assignee msofer
J cmimetype text/plain
J comment \nDuring\sthe\sCONST\sreforms\sleading\sup\nto\sTcl\s8.4\sthat\sallowed\sconst\sstrings\nto\sbe\spassed\sto\sTcl_Eval(),\setc...\na\scall\sto\sTclLooksLikeInt()\swas\sreplaced\nby\sTclParseInteger()\sin\sthe\nTclCompileIncrCmd()\sroutine.\n\nTclLooksLikeInt()\sallows\sfor\sleading\nwhitespce\sand\s+\sand\s-,\swhile\sTclParseInteger()\ndoes\snot.\s\sSo\sthe\stest\sdoesn't\spass\sas\noften\sas\sit\sused\sto,\sor\sas\sit\sshould.\nWhen\sthe\stest\spasses,\simmediate\noperands\sare\scompiled\sinto\sthe\nbytecode\sallowing\sfor\smore\sefficient\nexecution.\n\nAs\sit\shappems,\sTclLooksLikeInt()\nis\shappy\sand\ssafe\sto\suse\swith\sconst\nstrings.\s\sThe\sattached\spatch\srestores\nit,\swhich\sallows\sincrements\scontaining\nwhitespace\sand\sleading\ssign\scharacters\nto\sbe\scompiled\sto\smore\sefficient\sbytecode.\nThe\smost\snotable\scase\sis\sprobably\n[incr\sx\s-1].\s\sWill\sbe\sinteresting\sto\ssee\sif\nthis\schange\sshows\sup\sin\sany\sbenchmarks.
J foundin obsolete:\s8.4.9
J priority 5\sMedium
J resolution None
J status Open
J submitter dgp
J subsystem 47.\sBytecode\sCompiler
J title inefficient\sbytecode\sfor\s[incr\sx\s-1]
J type Bug
K 1165671fffffffffffffffffffffffffffffffff
U dgp
Z 3bc5626d00d7c948a5c76c8eb591c444