.
D 2003-10-25T05:27:13
J icomment Logged\sIn:\sYES\s\nuser_id=79902\n\nI\ssuspect\sthat\swe\scould\suse\sa\sbetter\scompilation\sstrategy\nthan\spurely\slist\sconcatenation,\sas\sthat\sdoes\sa\slot\sof\nobject-churn.\s\sMy\sidea\sgoes\ssomething\slike\sthis:\nTwo\snew\sopcodes\s(though\sone\smight\sbe\ssimulatable\susing\nexisting\sopcodes\s-\sI\sdon't\sknow\sfor\ssure):\nINST_VERIFY_LIST\sand\sINST_EXPAND_STK\s(might\swant\sit\sin\s1/4\nforms).\nINST_VERIFY_LIST\schecks\sthat\sthe\sobject\son\sthe\stop\sof\sthe\nstack\sis\sa\slist;\sit\s*doesn't*\spop\sanything\soff\sthe\sstack,\nbut\sit\sthrows\san\serror\sif\sit\sisn't\sa\slist\sat\sthe\sstack\stop.\nINST_EXPAND_STK\shas\sone\simmediate\svalue\swhich\sis\sthe\snumber\nof\swords\sto\sevaluate\s(much\sas\sin\sINST_INVOKE_STK)\sbut\sit\nalso\sreads\san\sadditional\sobject\soff\sthe\stop\sof\sthe\sstack\n(not\scounted?)\swhich\sis\sa\s*sorted*\slist\sof\sinteger\sindices\nto\sexpand.\n\nCompilation\sproceeds\sas\sfollows:\nGenerate\swords\sfor\scommand\sexecution\sas\snormal.\s\sIf\sany\sof\nthe\swords\sare\sexpanded,\sadd\sa\strailing\sINST_VERIFY_LIST\n(required\sfor\scorrect\sfunctioning\sof\sbasic-48.19.*)\sand\nappend\sthe\sindex\sof\sthe\sword\swithin\sthe\swhole\scommand\ninvokation\sto\sa\slist\syou\sare\sbuilding.\s\sIf\sat\sthe\send\sof\sthe\ncommand\syou've\sgot\sa\snon-empty\slist,\spush\sthe\slist\s(which\sis\nguaranteed\sto\sbe\ssorted\sints)\sand\suse\sINST_EXPAND_STK\ninstead\sof\sINST_INVOKE_STK.\sThis\ssimplifies\sthe\scompiler\n*and*\sallows\sfor\sa\smore\sefficient\sstrategy\sfor\suse\sof\ntemporary\sspace\swhen\sbuilding\sthe\sactual\slist\sof\sargument\nobjects.\n\nI\sproposed\ssuch\sa\sstrategy\sfor\sexpansion\scompilation\sback\sin\nthe\sdiscussions\sfor\sTIP#144\son\stcl-core\n
J login dkf
J mimetype text/plain
J username dkf
K 827119ffffffffffffffffffffffffffffffffff
U dkf
Z c1bd85990d2a67b25a03c73f3f64b47c