Skip to content
Tcl Source Code Artifact [15a3530d9a]
Login

Artifact [15a3530d9a]

Artifact 15a3530d9a0cf6f7a024e7223abbcbaf18806156:

Ticket change [15a3530d9a] - New ticket [1a25fdfec6ecf906|1a25fdfec6] <i>IndexTailVarIfKnown makes pointless call</i>. by dgp on 2016-03-11 14:25:13.
D 2016-03-11T14:25:13.297
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment In\stclCompCmdsGR.c\sthe\sroutine\sIndexTailVarIfKnown()\r\nmisuses\sTclWordKnownAtCompileTime().\r\n\r\nThe\soverall\sroutine\sis\sexamining\sthe\sword\s\r\nparsed\sin\svarTokenPtr,\sand\swants\sto\sreport\swhether\r\nthe\stail\sportion\sof\sthat\sword\scan\sbe\sdetermined\r\nso\sthe\slocal\svarname\scan\sbe\sknown,\sand\sbytecode\r\ncan\sbe\sgenerated\sfor\scommands\slike\s[global]\sand\s[variable].\r\n\r\nIn\sparticular\sit\sappears\sto\swant\sto\ssupport\sbytecoding\r\nof\sthings\slike\r\n\r\n\s\s\s\svariable\s[find-namesapce]::foo\r\n\r\nwhere\sthe\swhole\svalue\sof\sthe\sargument\sis\snot\sknown\r\nuntil\sruntime,\sbut\swe\sknow\sthe\stail\sportion\snow,\sso\r\nwe\sknow\sthe\slocal\sname\sargument\sto\sINST_NSUPVAR.\r\n\r\nThe\sproblem\sis\sthe\sroutine\sTclWordKnownAtCompileTime()\r\nis\scalled\sto\sask\swhether\sthe\sfinal\sportion\sof\sthe\r\nargument\sword\s(the\s'last\stoken')\sis\sknown.\s\sThis\suse\r\nmisses\sthe\sfact\sthat\sTWKACT\sis\sexplicitly\sthe\sroutine\r\nTcl***WORD***KnownAtCompileTime()\sand\swill\sonly\sreturn\r\ntrue\sfor\san\sentire\sword,\snot\sfor\stail\sportions\sof\sa\sword.\r\nThis\scall\salways\sreturns\sfalse\sas\swritten.\s\sAll\sthe\scode\r\nwritten\sto\shandle\sa\strue\sreturn\sis\sunused\sand\sworthless.\r\n\r\nThe\sidea\shere\sseems\sworthwhile,\sso\sthe\sfix\smay\sbe\sto\sjust\r\nput\sthe\sneeded\stesting\shere\sdirectly,\sreplacing\sthe\smisused\r\nTWKACT\scall.
J foundin all
J is_private 0
J login dgp
J priority 5\sMedium
J resolution None
J severity Minor
J status Open
J submitter dgp
J subsystem 47.\sBytecode\sCompiler
J title IndexTailVarIfKnown\smakes\spointless\scall
J type Bug
K 1a25fdfec6ecf9064dcd6337d00db87028a96188
U dgp
Z b80d37d70e961c7f24ea83bd02ee6f45