#487: Compiler macro called for functions declared NOTINLINE
-------------------------------+----------------------
Reporter: Eric Timmons | Type: defect
Status: new | Priority: major
Milestone: 1.8.1 | Component: compiler
Version: 1.8.1-dev | Keywords:
Parent Tickets: |
-------------------------------+----------------------
According to 3.2.2.1.3, compiler macros must not be applied if the
function is declared notinline. ABCL seems to call them anyways.
To reproduce, compile the following:
{{{
(in-package #:cl-user)
(eval-when (:compile-toplevel :load-toplevel :execute)
(declaim (inline explain))
(define-compiler-macro explain (&whole form &rest args)
(declare (ignore args))
(warn "Compile macro called!")
form)
(defgeneric explain (operation component))
(defmethod explain ((o string) c)
(declare (notinline explain))
(explain (find-class (read-from-string o)) c))
(defmethod explain ((o class) c)
(format t "~S ~S~%" o c)))
}}}
I expect no warning. However, one is signaled.
This is a reduction of something I noticed when prepping for the ASDF 3.4
series. It causes self upgrade to fail on ABCL.
I tried writing a version with normal functions, but couldn't reproduce.
So I don't know if I was just doing something wrong or if this only
happens with generic functions.
--
Ticket URL: <https://abcl.org/trac/ticket/487>
armedbear <https://abcl.org>
armedbear