Bug report: COMPILE-FILE not doing minimal compilation in DEFCONSTANT/DEFPARAMETER/DEFVAR

Mark Evenson evenson at panix.com
Mon Nov 16 06:40:13 UTC 2020



> On Nov 16, 2020, at 03:48, Robert Munyer <2433647181 at munyer.com> wrote:
> 
> COMPILE-FILE is supposed to expand all macros in such a way that they
> will not be expanded again when the compiled file is loaded.  (3.2.2.2)
> 
> The file below has 4 output lines that start with "*** Expanding macro".
> None of those lines should be printed when the compiled file is loaded.
> 
> ------- begin test-min-compilation.lisp -------
> 
> (macrolet ((m1 ()
>             (format t "~&*** Expanding macro 1.~%")
>             '(format t "~&Output of macro 1.~%")))
>  (m1))
> 
> (defconstant +dc+
>  (macrolet ((m2 ()
>               (format t "~&*** Expanding macro 2 inside DEFCONSTANT.~%")
>               '(format t "~&Output of macro 2.~%")))
>    (m2)))
> 
> (defparameter *dp*
>  (macrolet ((m3 ()
>               (format t "~&*** Expanding macro 3 inside DEFPARAMETER.~%")
>               '(format t "~&Output of macro 3.~%")))
>    (m3)))
> 
> (defvar *dv*
>  (macrolet ((m4 ()
>               (format t "~&*** Expanding macro 4 inside DEFVAR.~%")
>               '(format t "~&Output of macro 4.~%")))
>    (m4)))
> 
> ------- end test-min-compilation.lisp -------

[…]

I have filed this under [trac ticket][477], and thanks for the infomative report with reference to the [relevant passage from the CLHS][3.2.2.2].  

[477]: <https://abcl.org/trac/ticket/477>
[3.2.2.2]: <http://www.lispworks.com/documentation/HyperSpec/Body/03_bbb.htm>

-- 
"A screaming comes across the sky.  It has happened before but there is nothing 
to compare to it now."








More information about the armedbear-devel mailing list