Skip to content
Tcl Source Code Artifact [284dca90cc]
Login

Artifact [284dca90cc]

Artifact 284dca90cc2697028467c2fd7045880bcecd8aaa:

Ticket change [284dca90cc] - Ticket [1779249fffffffff|1779249fff] <i>alternate var and command resolver</i> status still Open with 6 other changes by dgp on 2015-07-21 16:37:00.
D 2015-07-21T16:37:00.424
J closer nobody
J comment The\spurpose\sof\sthis\sRFE\sis\sto\sto\sprovide\sa\sdifferent\sapi\sfor\snamespace/interp\svariable\sand\scommand\sresolvers.\sIt\sis\sbased\son\sa\sCallFrame\sdependent\sinterface,\sso\sonly\scommands\swhich\swant\sto\suse\sit\swill\sget\sinvolved.\sThe\sidea\sis\sfor\svariables\sto\slook\sthem\sup\sin\sa\sdifferent\snamespace,\sfor\scommands\sto\slook\sup\sconstructs\slike\sns1::command1\s(no\s::\sat\sthe\sbeginning!!)\sin\sa\sdifferent\snamespace,\swhich\scannot\sbe\shandled\sby\snamespace\spath.\r\n\r\nFor\sItcl\sthe\susage\sis\stohave\sall\svariables\sin\ssubnamespaces\sof\si.e.\s::itcl::variables\sin\san\sobject\sspecific\snamespace\swith\sthe\sclass\snamespace\sas\sa\ssubnamespace\sfor\severy\sclass\sin\sthe\sobjects\shierarchy\r\n\r\n::itcl::variables::object1::class1::var1\r\n::itcl::variables::object1::class2::var2\r\n::itcl::variables::object2::class1::var1\r\n\r\nfor\sclasses\sspecial\scommand\slookup\sfor\scommands\sworks\sas\sfollows:\r\nobject1\sclass1::command1\swill\sfind\sa\scommand\sin\si.e.\s::ns1::ns2::class1\r\nand\r\nobject1\sclass2::command2\swill\sfind\sa\scommand\sin\s::ns3::class2\s\r\n\r\nThe\sresolution\susing\sthe\sstored\sresolvers\sis\sdone\susing\sTcl_FindCommand\sand\sTcl_FindNamespaceVar.\sThe\scall\sof\sthese\sfunctions\sis\sdependent\son\sa\sflag\slike\sFRAME_HAS_RESOLVER\swhich\shas\sto\sbe\sput\sinto\sisProcCallFraem\sfrom\sthe\scaller\sof\sthe\scommand\s(so\sit\sis\sonly\sworking\slocally)\r\n\r\nA\sprototype\simplementation\scan\sbe\sfound\sin\sthe\sattached\sfile\s(this\shas\sbeen\stested\swith\sa\snew\sItcl\simplementation)
J icomment \r\nBeen\sswimming\sin\sthe\sItcl\s4\ssources\slately,\sand\sjust\snow\sgot\r\nled\shere\sto\sthis\score\spatch\srequest.\r\n\r\nI\scannot\svouch\sfully\sfor\swhat's\sproposed\shere;\shaven't\sreviewed\r\nit.\s\sBut\sI\scan\ssay\sthat\sthis\spoints\sin\sthe\sright\sdirection,\saddressing\r\na\spretty\sseriously\sfundamental\sflaw\sin\sthe\spublic\sinterface\sTcl/OO\r\noffers\sto\sextensions.\r\n\r\nName\sresolution\s--\sdefinitely\svariables,\slikely\scommands\stoo\s--\sis\r\nvery\sdeeply\sa\sper-CallFrame\soperation.\s\sDifferent\scallframes\sought\r\nto\sproduce\sdifferent\sresolutions.\s\sTcl\soffers\sno\sway\sat\sall\sto\sdiscover\r\nthe\scurrent\sCallFrame\sin\sits\spublic\sinterface,\snor\sdoes\sit\soffer\s\r\nresolver\shooks\sthat\skey\soff\sCallFrame\sstate.\s\sAll\sthe\sexisting\sresolver\r\ninterfaces\sare\seither\sinterp-wide,\sor\sare\sattached\sto\snamespace\scontexts.\r\nThis\sisn't\ssufficient,\sas\sTclOO\simplementation\sitself\sdemonstrates.\r\n\r\nLook\sat\sProcedureMethodCompiledVarConnect()\sin\stclOOMethod.c\s.\s\sIn\sorder\r\nto\sperform\svar\sname\sresolution\sproperly,\sit\ssimply\smust\sread\sthe\svalue\r\nof\siPtr->varFramePtr\s.\s\sThere\sis\sno\sother\sway\sto\sdo\sthe\sjob\sright.\s\sCertainly\r\nno\sway\swith\sonly\snamespace\sinfo,\sand\smost\scertainly\sno\sway\sthat\srespects\sNRE.\r\n\r\nTruly\sa\sshame\swe\sdropped\sthis\sball\sso\smany\syears\sago\swhen\sArnulf\shad\r\ngot\sus\sdown\sto\stouchdown\srange.
J login dgp
J mimetype text/plain
J severity Minor
K 1779249fffffffffffffffffffffffffffffffff
U dgp
Z 73384da83f067aad5e056703b3cc62be