[armedbear-devel] FLET incorrectly optimized away
Erik Huelsmann
ehuels at gmail.com
Sun Jun 27 10:14:08 UTC 2010
Hi William (or is it Martin?),
On Sat, Jun 26, 2010 at 3:51 PM, William Wadsworth
<will.wadsworth.10 at gmail.com> wrote:
> Hi,
>
> It appears that the compiler mistakenly optimizes out local functions in, say,
> definer macros. Below is a transcript of a sample session that clarifies the
> problem:
>
> CL-USER(1): (defmacro define-fn (name &body body)
> `(defun ,name () (flet ((%one () 1)) , at body)))
> DEFINE-FN
> CL-USER(2): (defmacro do-add1 () `(%one))
> DO-ADD1
> CL-USER(3): (define-fn fn1 (do-add1))
> ; Note: deleting unused local function FLET %ONE
> FN1
> CL-USER(4): (fn1)
> #<THREAD "interpreter" {6DDDCF}>: Debugger invoked on condition of
> type UNDEFINED-FUNCTION
> The function %ONE is undefined.
> Restarts:
> 0: CONTINUE Try again.
> 1: USE-VALUE Specify a function to call instead.
> 2: RETURN-VALUE Return one or more values from the call to %ONE.
> 3: TOP-LEVEL Return to top level.
> [1] CL-USER(5): :res
>
Thanks for the nice and small report again!
Just a minute ago, I committed a fix for your error on trunk. If you
find more issues, please don't hesitate to report them!
Bye,
Erik.
More information about the armedbear-devel
mailing list