<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">Hi Jason,</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">Thank you very much for raising the preamble issue.</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><font color="#000000" class="">It seems like it is fixable, see below. The idea of a “preamble” will probably be removed.</font></div><div class="">Fix still needs to be implemented by me.<br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">The blog post has been amended to document this bug. Search for “TODO BUG #2”.</span><br style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">;; TODO BUG #2 2023-02-28</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">(parenscript:ps*</div><div class=""> '(defun bar () (tagbody (go x) (alert "hi") x)))</div><div class=""><br class=""></div><div class="">#|</div><div class="">returns</div><div class=""><br class=""></div><div class="">"defun(bar, null, (function () {</div><div class=""> go(x);</div><div class=""> alert('hi');</div><div class=""> var switchVar295 = 1;</div><div class=""> while (true) {</div><div class=""> switch (switchVar295) {</div><div class=""> case 1:</div><div class=""> 'tagbody-go-tag: X';</div><div class=""> };</div><div class=""> __PS_MV_REG = [];</div><div class=""> return;</div><div class=""> };</div><div class="">})());”</div><div class="">|#</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">This output is incorrect.</div><div class="">There should be no "go(x);" under any relevant circumstances</div><div class="">as by the CLHS definition of (tagbody ...) and (go ...) .</div><div class=""><br class=""></div><div class="">The problem seems to be that the search for the</div><div class="">"preamble" only checks for go-tags and not for</div><div class="">(go ...) forms. This seems to be easily fixable</div><div class="">by amending the preamble search to terminate upon</div><div class="">encountering a top-level (go ...) form.</div><div class="">Problem: (tagbody (funcall (lambda () (go x))) (alert "hi") x)</div><div class="">still has the same behaviour, *without* involving</div><div class="">a (go ...) form at the top level of the (tagbody ...).</div><div class=""><br class=""></div><div class="">Alternative proposal:</div><div class="">Do away with the preamble and instead add a</div><div class="">dummy gensymmed jump tag at the beginning</div><div class="">of the (tagbody ...). That jump-tag should,</div><div class="">conceptually, be unreachable. All (go ...)</div><div class="">forms are then affected by the (macrolet ((go ...)) ...)</div><div class="">wrappers being placed already.</div><div class="">Then the preamble analysis becomes dead code and can</div><div class="">be removed.</div><div class=""><br class=""></div><div class="">See Jason Miller's first bug reported on 2023-01-27</div><div class="">for current problems with wrapping (go ...) forms</div><div class="">inside of (lambda ...) forms.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Andrew</div><div class=""><br class=""></div><div class=""><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 27, 2023, at 15:16, Jason Miller <<a href="mailto:jason@milr.com" class="">jason@milr.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">(parenscript:ps (defun bar () (tagbody (go x) (alert "hi") x)))</span></div></blockquote></div><br class=""></body></html>