* lisp/emacs-lisp/cl-generic.el (cl--generic-compiler): Clarify the test

Use `compiled-function-p`.
This commit is contained in:
Stefan Monnier 2024-01-25 14:24:20 -05:00
parent d22a3e5afe
commit 4e260bfc47

View file

@ -672,7 +672,7 @@ The set of acceptable TYPEs (also called \"specializers\") is defined
;; compiled. Otherwise the byte-compiler and all the code on ;; compiled. Otherwise the byte-compiler and all the code on
;; which it depends needs to be usable before cl-generic is loaded, ;; which it depends needs to be usable before cl-generic is loaded,
;; which imposes a significant burden on the bootstrap. ;; which imposes a significant burden on the bootstrap.
(if (consp (lambda (x) (+ x 1))) (if (not (compiled-function-p (lambda (x) (+ x 1))))
(lambda (exp) (eval exp t)) (lambda (exp) (eval exp t))
;; But do byte-compile the dispatchers once bootstrap is passed: ;; But do byte-compile the dispatchers once bootstrap is passed:
;; the performance difference is substantial (like a 5x speedup on ;; the performance difference is substantial (like a 5x speedup on