Skip to content
Tcl Source Code Artifact [185719477b]
Login

Artifact [185719477b]

Artifact 185719477ba58911fb9e505a2de87b8485325cdc:

Ticket change [185719477b] - Ticket [322720f99dbe67f7|322720f99d] <i>Poor bytecode (optimizations?) for || and &amp;&amp;</i> status still Open with 4 other changes by dkf on 2017-03-04 12:38:12.
D 2017-03-04T12:38:12.352
J icomment The\sproblem\sis\sthat\sthe\soptimiser\sis\snot\sdetecting\sthis:\r\n<blockquote><pre>\r\n\s\s\s\s\s\s\s\sjumpTrue\slbl1\r\n\s\s\s\s\s\s\s\spush\s"1"\r\n\s\s\s\s\s\s\s\sjump\slbl2\r\nlbl1:\s\s\spush\s"0"\r\nlbl2:\s\s\sjump<i>Cond\slbl3</i>\r\n</pre></blockquote>\r\nWhereas\sit\sis\sclearly\sprovable\sthat\sconverting\sit\sinto\sjust\sthis:\r\n<blockquote><pre>\r\n\s\s\s\s\s\s\s\snop<sup><i>n</i></sup>\r\n\s\s\s\s\s\s\s\sjump<i>Cond\slbl3</i>\r\n</pre></blockquote>\r\nwould\swork\sfine\s(provided\sthere\sare\sno\sother\sbranches\stargeting\sanywhere\sinside\sthe\sinstruction\ssequence).\s<small>Note\sthat\sthe\soptimiser\sas\sit\sstands\sneeds\sto\skeep\sthe\sinstructions\sthat\sare\splaced\sin\sthe\ssame\slocation\s(hence\sthe\s<tt>nop</tt>s)\sbut\sa\scompacting\soptimiser\sis\sentirely\spossible\sprovided\ssomeone\sdoes\sthe\swork.</small>\r\n<p>\r\nThere\smay\sbe\srelated\sissues\swith\sthe\sinstruction\ssequence\sfor\s<tt>&amp;&amp;</tt>\sand\sthat\sshould\sbe\schecked\sat\sthe\ssame\stime.\sTest\scode\sshould\suse\s<tt>tcl::unsupported::getbytecode</tt>\sinstead\sof\sattempting\sto\sparse\sthe\sdisassembler\soutput.
J login dkf
J mimetype text/html
J username dkf
K 322720f99dbe67f791e557876bd46e734544b988
U dkf
Z 4f0adcb4e9763f6fcfcaca8a7d96f7ee