Fwd: possible abcl bug: incorrectly deletes "unused" local function

Erik Huelsmann ehuels at gmail.com
Sun Apr 5 13:06:55 UTC 2015


Hi,

On Sun, Apr 5, 2015 at 2:14 PM, Mark Evenson <evenson at panix.com> wrote:

> But the example shows SAMPLE2 being executed not =SAMPLE2.
>

Ah. right. that's an error. I can see the error regarding dead code
elimination in precompile.lisp:precompile-flet/labels. Working on a fix
right now.


Regards,


Erik.

> Tersely pecked on a Nexus 5
>  On Apr 5, 2015 2:09 PM, Erik Huelsmann <ehuels at gmail.com> wrote:
>
> Hi Mark,
>
> On Sun, Apr 5, 2015 at 11:13 AM, Mark Evenson <evenson at panix.com> wrote:
>
> On 4/4/15 18:28, Erik Huelsmann wrote:
>
> […]
>
> The copy of the bug code you sent me got garbled as follows:
>
> (defun =sample2 (n)
>   (macrolet ((f (result x)
>                 `(list 'more (lambda () (=f ,result ,x))))
>              (g (result x)
>                 `(list 'more (lambda () (=g ,result ,x)))))
>     (labels ((=f (result x)
>                (if (zerop x)
>                  result
>                  (g (1+ result) (1- x))))
>              (=g (result x)
>                (f result x)))
>       (f 0 n))))
>
>
> I assume that one is supposed to remove all the #\= characters?
>
>
> It's exactly the code that was sent to me. I think the point is that the
> macrolet conceils the fact that the "=g" function is being called through
> the "g" macro and that ABCL incorrectly handles the situation as dead code.
>
>
> Regards,
>
> --
> Bye,
>
> Erik.
>
> http://efficito.com -- Hosted accounting and ERP.
> Robust and Flexible. No vendor lock-in.
>
>


-- 
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20150405/eb86f570/attachment-0001.html>


More information about the armedbear-devel mailing list