Re: master: Better ftype for compiler-macro-function

Charles Zhang via Sbcl-commits <[email protected]> Fri, 10 Apr 2026 18:19:01 +0000 (UTC)
Newsgroups gmane.lisp.steel-bank.cvs,gmane.lisp.steel-bank.devel
Message-ID <[email protected]>
Why is it not flushable?



On Friday, April 10, 2026, 7:13 PM, stassats via Sbcl-commits <[email protected]> wrote:

The branch "master" has been updated in SBCL:
      via  57c047b5d5e3f8a0543b6cd30cb80bd56c495618 (commit)
      from  84d567275cae72917dba852b9a68e9a606290cf2 (commit)

- Log -----------------------------------------------------------------
commit 57c047b5d5e3f8a0543b6cd30cb80bd56c495618
Author: Stas Boukarev <[email protected]>
Date:  Fri Apr 10 19:56:10 2026 +0300

    Better ftype for compiler-macro-function
---
 src/code/macroexpand.lisp | 1 +
 src/compiler/fndb.lisp    | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/code/macroexpand.lisp b/src/code/macroexpand.lisp
index 06afb7519..2a358f468 100644
--- a/src/code/macroexpand.lisp
+++ b/src/code/macroexpand.lisp
@@ -158,6 +158,7 @@
 (defun compiler-macro-function (name &optional env)
  "If NAME names a compiler-macro in ENV, return the expansion function, else
 return NIL. Can be set with SETF when ENV is NIL."
+  (declare (explicit-check name))
  (legal-fun-name-or-type-error name)
  ;; CLHS 3.2.2.1: Creating a lexical binding for the function name
  ;; not only creates a new local function or macro definition, but
diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp
index 031f225ca..25e01ad51 100644
--- a/src/compiler/fndb.lisp
+++ b/src/compiler/fndb.lisp
@@ -142,9 +142,9 @@
    (t &optional lexenv-designator)
  (values form &optional boolean))
 
-(defknown compiler-macro-function (t &optional lexenv-designator)
+(defknown compiler-macro-function ((or symbol cons) &optional lexenv-designator)
  (or function null)
-  (flushable))
+  ())
 
 ;;;; from the "Declarations" chapter:
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL


_______________________________________________
Sbcl-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-commits

_______________________________________________
Sbcl-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-commits