Skip to content
Tcl Source Code Artifact [77c3e77da0]
Login

Artifact [77c3e77da0]

Artifact 77c3e77da0ea438e32df9eba8712e5fdf15ee97104fa8e8ee64b41379e1a931b:

Ticket change [77c3e77da0] - Ticket [67d5f75c36cbada6|67d5f75c36] <i>[$interp eval $lambda] after [eval $lambda] or vice versa fails</i> status still Open with 3 other changes by apnadkarni on 2024-10-01 17:50:19.
D 2024-10-01T17:50:19.320
J icomment Possible\sfix\sat\s[de39c09363].\sThis\sattempts\sto\smimic\s8.6\sby\srecompiling\sthe\slambdaon\san\sinterp\smismatch.\sFixes\sthe\sreported\sbug\sand\spasses\stest\ssuite.\r\n\r\nI\sam\showever\suncomfortable\sfor\sa\scouple\sreasons.\r\n\r\n1.\sI\sam\snot\ssure\sthis\sexactly\sor\scompletely\simitates\sthe\s8.6\simplementation\sor\sbehavior\sgiven\sthe\sextensive\srefactoring\sin\sthat\sarea.\r\n\r\n2.\sMore\simportant,\seven\swith\s8.6\sI\sam\snot\ssure\show\sall\sthis\srecompilation\sof\sa\slambda\swould\swith\swork\sin\sthe\smiddle\sof\san\sexecution.\sFor\sexample,\sthe\sfollowing\scode\swhich\spasses\sa\slambda\s*in\sthe\smiddle\sof\sits\sexecution*\sto\sa\ssubinterpreter\swhich\salso\sexecutes\sthe\slambda.\r\n\r\n```\r\nset\slambda3\s[list\sapply\s{{id\slambda\sargs}\s{\r\n\s\s\s\sputs\sHi:$id\r\n\s\s\s\sif\s{[llength\s$args]}\s{\r\n\s\s\s\s\s\s\s\s[lindex\s$args\s0]\seval\s$lambda\schild\s[list\s$lambda]\r\n\s\s\s\s}\r\n\s\s\s\sputs\sBye:$id\r\n}}]\r\n\r\n```\r\n\r\nThe\sinternal\srep\sof\sa\slambda\sstores\sa\spointer\sto\sthe\sinterpreter\sit\swas\scompiled\sin\s(within\sa\sProc\sstruct).\sWhen\sthe\scall\sto\sthe\schild\sis\smade,\sthe\slambda\sis\srecompiled\sand\sthe\sinternal\srep\spoints\sto\sthe\schild\sinterpreter.\sWhen\sthat\scall\sreturns,\sdoes\sthe\slambda\sin\sthe\smain\scontinue\swith\sthe\sinternal\srep\spointing\sto\sthe\schild\sinterpreter\s?\sOr\sis\sit\srestored\sto\sthe\smain\sinterpreter?\sIf\sthe\slatter,\sI\scan't\sfigure\sout\swhere.\sIf\sthe\sformer,\sisn't\sthat\sa\sproblem\s(but\sI\sdon't\syet\sknow\show\sto\sconstruct\sa\scase\sto\sillustrate\sthat\sit\sis).\r\n\r\nA\ssecond\spair\sof\seyes\swould\sbe\shelpful.
J login apnadkarni
J mimetype text/x-markdown
K 67d5f75c36cbada6cf2361aaf49cffa61281143b
U apnadkarni
Z 4086b81992a26a7ef2ff06bf0912e1a9