<i>"global" cmd literal sharing vs. per-interp resolvers</i> status still Open with 3 other changes
by
.
D 2016-07-25T09:34:45.948
J icomment The\sattached\spatch\sresolver866-2\simplements\sthe\salternative\sapproach\spointed\sout\sin\sthe\slast\sparagraph\sof\sthe\sbug-description.\sThis\salternative\spatch\saddresses\sthe\sglobal\sliteral\ssharing\sproblem\sby\sintroducing\sunshared\sliterals.\sThe\sfirst\sapproach\sinserted\sa\scmd\sliteral\sto\sthe\sglobal\sliteral\spool\sand\sused\sTclHideLiteral()\sto\sturn\sa\sshared\sliteral\sinto\sa\sprivate\sliteral\swhen\snecessary.\r\n\r\nIn\sthis\s2nd\sapproach,\scmd\sliterals\swhich\sare\sresolved\svia\scustom\sname\r\nresolver\sare\sNOT\sshared\sat\sall\s(i.e.\snot\sinserted\sto\sthe\sglobal\sper-interp\sliteral\spool)\sby\sallowing\sto\screate\sunshared\sliterals\sby\sthe\sliteral\sinfrastructure.\sTo\sease\sthe\shandling\sof\scmd\sresolvers,\sthe\spatch\sintroduces\stwo\snew\sflags:\sCMD_VIA_RESOLVER\sand\sLITERAL_UNSHARED\sto\smake\ssuch\scases\smore\sexplicit\sand\seasier\sto\smaintain.\r\n\r\n-\sNew\sflag\sCMD_VIA_RESOLVER\sfor\s"struct\sCommand":\s\sWhen\sthis\sflag\sis\r\n\s\sset,\sthe\scommand\swas\sresolved\svia\sa\scustom\sresolver.\r\n\s\s\r\n-\sNew\sflag\sLITERAL_UNSHARED\sfor\sTclRegisterNewLiteral():\sWhen\sthe\sflag\r\n\s\sis\sset\sthe\sliteral\sshould\snot\sbe\sshared.\sAs\sa\sconsequence,\sthere\r\n\s\smight\sexist\slocal\sliterals,\swhich\sare\snot\spart\sof\sthe\sglobal\r\n\s\s(per-interpreter)\sliteral\spool\s(which\sentails\sa\smodification\sin\r\n\s\sTclVerifyLocalLiteralTable())\r\n\r\nThis\spatch\saddresses\sas\swell\spart\sof\s3418547\s(testcase\sresolver-1.4).\r\nThe\stestcases\sof\s3418547\sare\sa\slittle\sproblematic:\sBy\strying\r\nto\sbe\sas\slittle\sinvasive\sas\spossible\sthe\scmd\sresolver\r\nchange\sthe\sliteral\s"z"\sonly\swhen\scalled\sfrom\sa\sproc\snamed\r\n"x".\sHowever,\sduring\sbyte-code\scompilations\sof\sa\sproc\sbody,\sthe\r\ncalling\sproc\sis\snot\savailable,\stherefore\sTcl_FindCommand()\sreturns\r\nfor\sthe\ssame\s"z"\sdifferent\sas\sresult\sas\sin\sother\sinvocation\scontexts.\sThis\sunstable\sresult\scontributes\smay\sbe\sas\swell\sto\sthe\sneed\sfor\sTclInvalidateCmdLiteral()\sin\sthe\stest\scases.\r\n\r\nResults\sfor\sresolver.test\sfor\scmd\sliteral\stest\scases\swhen\sTclInvalidateCmdLiteral()\sis\sdeactivated:\r\n\s\s\r\n\s\s\s\s\sOK:\sresolver-1.4,\sresolver-3.1a,\sresolver-3.1b,\sresolver-3.1c\r\n\s\s\s\s\sNOT\sOK:\sresolver-1.1,\s1.2,\s1.3,\s1.5,\s1.6\r\n\r\nWith\sthis\spatch,\sall\stest-cases\sfrom\sthe\shead\sversion\sof\snsf\swork\sfine,\salso\swhen\sTclInvalidateCmdLiteral()\sis\sdeactivated.
J login gustafn2
J mimetype text/plain
K d4e7780ca1681cd095dbd81fe264feff75c988f7
U gustafn2
Z 0d8d2977ef64a2f5367352ef4b5cdfe9